The tag has no wiki summary.

learn more… | top users | synonyms

10
votes
1answer
3k views

Can I query a tab-delimited file from SSMS?

Is it possible to query a tab-delimited file from Sql Server Management Studio to view its data without saving it anywhere? I know you can BULK INSERT from a tab-delimited file using something like: ...
9
votes
5answers
8k views

Save Results as CSV *with* headers in SSMS

With SQL Server 2008 R2, when I save the results as a CSV there are no headers. I can work around this by copying and pasting with the "Copy with Headers" , or just grab the headers and paste them in ...
6
votes
1answer
270 views

How many disk seeks does it take to write one row on SQLite?

As far as I understand, there can be one disk-seek per rotation of a harddisk, therefore I am interested to know how many disk seeks are needed for writing a row to an SQLite table, including locking ...
4
votes
1answer
1k views

Update oracle sql database from CSV

I tried google at first but no luck. Is it possible to update tables from csv file? I am using SQL developer and I am using a script to export edited rows to a csv file. I would like to update the ...
4
votes
1answer
412 views

MySQL Import CSV with Multiple Field Separators

I'm trying to import this CSV file into MySQL that appears to be optionally enclosed by more than one character. Unfortunately, MySQL only supports one character as a field separator. I am stuck ...
3
votes
1answer
6k views

psql denies access to file when using COPY FROM

When I do this: COPY "mytable" FROM '/my/file.csv' WITH DELIMITER AS ',' CSV; On this: -rw-r--r-- 1 peter peter 54819176 2011-07-21 13:17 file.csv psql tells me this: ERROR: could not open ...
3
votes
0answers
259 views

Conversion of GRIB and NetCDF to my database [closed]

I have downloaded "High Resolution Initial Conditions" climate forecast data for one day. The file had an .tar.gz extension so I extracted it in my local directory and I get the files listed here: ...
2
votes
4answers
145 views

Options for dumping Oracle queries to text files with no database server filesystem access

I've an application currently producing reports using UTL_FILE and DIRECTORY. We are migrating this application to an environment in which there will be no filesystem access on the database server ...
2
votes
1answer
12k views

How to import a.csv file into a postgresql database using \copy?

I am trying to import a .csv file into a postgresql database. I am using pgadmin III for that on a win7 machine. My query looks like that: \COPY pop_grid(GRID_ID, POP_TOT, YEAR, METHD_CL, CNTR_CODE, ...
2
votes
2answers
5k views

MySQL - CSV UPDATE (not INSERT) into existing table?

I have a table with the following columns: id | name | city The table has 1000 entries in it. I have a CSV file with a limited number of lines like this: id,city 34,Denver 45,Kansas City 145,New ...
2
votes
3answers
374 views

What's the easiest way to re-format CSV exports from MySQL into Excel/ flat-file fields?

I've just had some database backup problems on a website I run containing some important lead data. Unfortunately, I've now lost one of the key MySQL tables, which means my data has lost its ...
2
votes
1answer
205 views

Apply in a CSV file to multiple databases

Recently, I have been working with a client whom has asked us to provide their dataset for use in a mobile application we are making for them. The requirements for this project include the ability to ...
2
votes
1answer
534 views

excel sheet input to mysql

I want to add about 1000 records to a table that contains 31 fields. The worst part is those 1000 records are in the form of an excel sheet having some columns left unfilled. Is there any easy way to ...
2
votes
0answers
98 views

sql data to a csv-file via cobol

I 'm using the following code : string 'insert into ' delimited by size 'tgamGameTeams ' delimited by size '(Id,Name,RemainingBudget,TeamGamePoints,GameId) ' ...
1
vote
1answer
93 views

Looking for an efficient way to clone tens of millions of database records

A laboratory I work in is attempting to clone the open, biochemical database managed by PubChem found here. (Please don't ask why, I am not in charge of this project, I am simply tasked with the ...
1
vote
1answer
330 views

How to troubleshoot COPY FROM inserting less rows then expected?

I have a CSV (tab-delimited in fact) file with 7,590,051 lines, according to wc -l, which I want to import using COPY FROM. I removed the table's primary key, so it has no constraints. I ran COPY ...
1
vote
1answer
359 views

Behavior of PostgreSQL COPY FROM

Let me preface this question by stating that my experience with DBA is limited to an introductory undergraduate university course, and that I'm just getting started with PostgreSQL. I would like to ...
1
vote
1answer
48 views

When importing raw files for internal conversion, should I use a secondary database or just isolate them within the database?

When importing raw files for internal conversion, should I use a secondary database or just isolate them within the database? I've got between 1.25 and 2GB of CSV files to be imported (and already ...
1
vote
2answers
926 views

Loading data in mysql using LOAD DATA INFILE, replication safe?

I am trying to load data into mysql database form CSV file. I found that we could use LOAD DATA INFILE command to do it. But as per the mysql documentation it is not replication safe. (See here) Is ...
1
vote
1answer
42 views

Can I create a MySQL CSV table directly from an existing CSV file?

MySQL has a CSV storage engine. I'm wondering if I could create such a table directly from an existing CSV file. Made up command as example: CREATE TABLE test (i INT NOT NULL, c CHAR(10) NOT NULL) ...
1
vote
2answers
106 views

Advanced CSV export formatting in MS Access

I am trying to create a CSV file with the following format (for import into MYOB AccountRight financial software): InvoiceNum1,Line1,... InvoiceNum1,Line2,... InvoiceNum2,Line1,... ...
1
vote
1answer
335 views

import csv data stored in a blob column

Here's what i need to do: Users will upload CSV files into SQL Server 2012 blob column Each night, i would like to take each file and import the data into table I will have 2 web sites using the ...
1
vote
1answer
399 views

Command line export and import CSV in SQL Server 2008 R2

I have a database xyz and 100+ tables and has to perform the following operations on the command line: I need to create CSV of all tables in one go. CSV with column separator ,, fields enclosed by " ...
1
vote
1answer
703 views

MySQL import csv only gets half the lines

I use the following command to read in a csv: LOAD DATA INFILE '/Users/Tyler/Desktop/players_escaped.txt' INTO TABLE players FIELDS TERMINATED BY ',' ENCLOSED BY '^' LINES TERMINATED BY '\n'; The ...
1
vote
2answers
674 views

Access exporting to CSV is weirdly slow

I have searched but could not find anything similar. If I just run the query, I can get the result pretty quickly (~5 mins); but after I saved the query to export as CSV, the exporting part is ...
1
vote
0answers
20 views

Best way to store data with small differences for collective analysis

I have a collection of CSV files each containing data about the same topic, but with small differences. For example units carrying out a job might in one file be identified by one field, in the other ...
1
vote
1answer
1k views

MySQL import csv file ERROR 13 (HY000): Can't get stat of /path/file.csv (Errcode: 2)

I am an absolute beginner to MySQL (5.5.34) / Linux (Ubuntu 12.04 LTS)` I have created a simple database with one table. When trying to import data into it via a 'data_test.csv file an error message ...
1
vote
1answer
228 views

Import CSV file into Mysql with Multiple Delimiters/Field Separators

I'm trying to import a large csv file into Mysql. Unfortunately, the data within the file is separated both by spaces and tabs. As a result, whenever I load the data into my table, I end up with ...
1
vote
0answers
234 views

Can PostgreSQL's COPY create CSV with Locale-specific number formatting?

I want to create a CSV with PostgreSQL 9.1 COPY that directly opens correctly with a double-click in crazy German Excel 2010. Using ";"-Delimiter is easy. The encoding is solved, but Excel only ...
1
vote
0answers
36 views

Import CSV file into SQLServer [duplicate]

Possible Duplicate: Convert varchar column to datetime Hi I am using the SQL server Import wizard to import a CSV file into what will be a new table in my database. An example of the CSV ...
0
votes
2answers
893 views

Doing a comparison on two csv files with no Primary Key

I'm wondering if in SSIS there is a way to compare two csv files(with the same structure) with no reference key to make a record unique. To give you a better picture from what I mean; In initial load ...
0
votes
3answers
3k views

Export Postgres table on remote server to CSV file on local machine?

I have access to DB on remote server where I can do only select command, So, I can execute: COPY products TO '/tmp/products.csv' DELIMITER ','; But on that server I don't have permission to ...
0
votes
1answer
190 views

Bulk loading to partitioned table

I am designing a database application which will be using PostgreSQL 9.3. My question is regarding bulk loading a CSV to a partitioned table. I have done a lot of research, but I'm still unsure of ...
0
votes
1answer
310 views

Dealing with empty strings while loading a table from a CSV

I am trying to load a CSV file into a table. The CSV file contains some empty strings for example: 1,2,,4 I want to load the empty field as null. One way I know is to use \N i.e: 1,2,\N,4 but it ...
0
votes
1answer
435 views

Getting error while importing large data through csv

I am new Postgres. I am getting constraint violation errors while importing a large CSV file. I want to disable all of the database constraints temporarily - I do not know how to do this.
0
votes
1answer
242 views

Permission Denied Copy [closed]

I am a beginner learning how to load data and I can't figure out why I can't load this data into postgres. I am using postgres 8.4 on MAC OS. copy tname from '/Users/Shared/folder/file.cxv' ...
0
votes
1answer
238 views

Which tools can be used to clean CSV files prior to bulk insert?

Which tools and programming libraries are you aware of that can help accelerate CSV manual correction process when column separator characters are encountered within data elements? I'm currently not ...
0
votes
0answers
44 views

Export to csv using db2 v10 for z/os

in db2-luw, I can create a csv using the export command. However, running the same command in z/os results in: SQL1325N The remote database environment does not support the command or one of ...
0
votes
1answer
116 views

Inserting all csv files into a table in mySQL?

I am looking for a way to insert all my csv files into mySQL without having to write several "LOAD DATA INFILE" statements as I have many csv files I need to insert and the files themselves are very ...
0
votes
0answers
12 views

Export database in one file with every dataset existing

I've got a unusual question. The human resources needs to export an old DB to a new one. And the guys managing the new DB wants one csv file with every dataset existing. I did a Relational database ...
0
votes
0answers
228 views

CSV File Into MYSQL Merging - LOAD DATA on Duplicate Key?

Hey Dba Stack Exchange, My question to you is with regards to mysql. Right now I have a medium to small sized csv with 25k lines I need imported into mysql for a client. Problem is, their is only ...
0
votes
0answers
906 views

how to import .xls file into SQLite database?

I have an issue with importing .xls file into SQLite database. I am working on windows xp and using a SQLite manager for maintain the database. I can import the .csv file to the database by using ...
0
votes
1answer
274 views

Set field values to newly imported rows in PostgreSQL table with existing data

I have a PostgreSQL table with existing data, and needs to import all the rows in a CSV file into that table. I am using pgadmin3's Import tool to do the import. Question: For the newly imported ...
0
votes
0answers
248 views

Understanding the time difference between data grid initial display and export/full display using Toad for Oracle

I am trying to run a query on a local Oracle DB and output the results to a .CSV file. The query runs in a decent amount of time (usually less than 5 minutes), but returns tens of thousands (possibly ...