A file with contents formatted as comma-separated values.

learn more… | top users | synonyms

1
vote
1answer
11 views

Postgres \copy from CSV: how to format range variables?

Consider a Postgres table containing a range variable: CREATE TABLE my_table (t_range tsrange, field1 text); If I want to manually insert a row via psql, I can run: INSERT INTO my_table (t_range, ...
0
votes
1answer
32 views

MySql Workbench Data Import .csv

Hi I am trying to use to MySql Workbench Data Import facility to import a .csv file (thousands of records). However it stops importing the first 5 records. After studying the .csv file I could see ...
0
votes
1answer
40 views

question regarding csv format?

CSV format cannot be used for importing text files to a database unless the table for the data is already defined in the database. is this true or false?
0
votes
1answer
51 views

Import quoted CSV

I have a set of quoted CSV files, which I need to import into SQL Server. Files look like this: "ColA","ColB","ColC" "12345","John Smith","-75.33" "12356","Jane Doe","43.12" BCP and BULK INSERT ...
0
votes
1answer
40 views

Fill a GTT with external data each session

I have to import an external csv file into a table in database each day. The file is encoded in 'UCS2-LE BOM'. I have found a solution using external tables and bulk insertion, but the problem is to ...
1
vote
1answer
42 views

leading 0 missing in column when exporting to csv

I have a query I export which is then used to import products into our website. One of the ways we help people find products more easily is by using a long and short item code. It's basically the ...
0
votes
1answer
22 views

SSIS - Update Specific Cell in CSV

I have a pre-defined csv template. The header row begins on row 5. Prior to this I have a date value in cell B2. How do I update this cell value in SSIS?
1
vote
3answers
153 views

Best DB structure for large CSVs?

I have previously posted on stackoverflow, however, I have been directed here. I'm getting to the stage where I need to analyse lots of flat CSVs: Read-in around 500GB of CSVs (e.g. daily data ...
0
votes
0answers
37 views

How to pivot a CSV file into a table

Input: a CSV file which cannot be changed prior to import Desired Output: A table where CSV_File.Name is a column and CSV_File.TagValue is the data in that column with a Key field Timestamp column ...
0
votes
1answer
92 views

Load data - fields terminated by character appearing within a field statement

I have an issue with loading data from a csv file. The question is, without preprocessing, is it possible to have an exception in the following code load data local infile 'Program.csv' into table ...
0
votes
0answers
103 views

Restore .dmp file into csv

We have asked our clients for certain data in a csv file format and we just got a .dmp file. I have been trying to open it using MySQL as if it were .dump but it doesn't work. I have seen other ...
1
vote
2answers
740 views

MySQL LOAD DATA INFILE Error Code 1366. Incorrect integer value: ' '

I've been trying to upload a CSV table into my remote server database but I find an error. I use MySQL in a RedHat Linux distrib. My mycsv.csv file looks like this: ...
3
votes
1answer
122 views

SSIS Repeated Header In CSV File

I am writing to a csv file in a Foreach loop. For each loop the code is writing the header so it appears repeatedly throughout the file. How do I ensure the header only appears once? I have tried ...
0
votes
0answers
130 views

Import CSV to MySQL with long text fields

I'm trying to import a CSV file (';' separated) to a MySQL table. Normaly, I use a SQL like: LOAD DATA LOCAL INFILE 'local-path/file.csv' INTO TABLE tmp_table CHARACTER SET latin1 FIELDS TERMINATED ...
1
vote
2answers
543 views

HeidiSQL: Import CSV

A few lines of my CSV: "id","date","date_","pow","ene","reac" "ES0134000563024539AM0F","2013-05-02","2013-06-05","62","43","43" "ES0134000573024539AM0F","2013-05-02","2013-06-05","62","43","43" ...
2
votes
2answers
127 views

Importing CSV's into MySQL(5.6) tables leaves date fields as 0000-00-00

During the import from a CSV file created from an MS Access table into a MySQL table it converts all date fields in the csv into 0000-00-00. I use the following Load Data command for the import. ...
1
vote
1answer
1k views

import CSV into mysql table via command prompt (MySQL 5.6.25)

I'm trying to load CSV's into a mysql database with this command: LOAD DATA LOCAL INFILE '\Users\userName\Downloads\tableName.csv' INTO TABLE tableName FIELDS TERMINATED BY ',' LINES TERMINATED BY ...
1
vote
1answer
1k views

Copying CSV file to temp table with dynamic number of columns?

I am wondering if there is a way to copy a csv file into a temp table where the number of columns is unknown in the csv file. The DB software I'm using is PgAdmin III. I figured out that if I do know ...
2
votes
3answers
1k views

Bulk Insert - (0 row(s) affected)

I am trying to import a .CSV file into a mssql table using bulk insert (Although I am open to other methods). I have a bulk insert sql statement but it says (0 row(s) affected) when I execute the the ...
0
votes
0answers
29 views

UPDATE from CSV generated with SQL JOINs

I want to do an UPDATE operation on DB by importing a CSV file. The complication is that I am creating the CSV by exporting the results generated by a Query containing SQL JOINs. How can I do an ...
1
vote
1answer
358 views

Compact Spool file from Sqlplus

I have scripts that I run in Oracle SQL Developer and then export the result to my pc as a csv. I now started using sqlplus with a .bat to run my scripts and spool the result to my pc. But I noticed ...
1
vote
1answer
655 views

Correct 'lines terminated by' for query

I am trying to query two tables of data and send them to a csv file for upload to a website. However i am having trouble getting the formatting to play ball. I want headings to separate into columns ...
0
votes
2answers
1k views

SQLite CSV import won't create a table automatically

According to https://www.sqlite.org/cli.html#csv, sqlite> .mode csv sqlite> .import C:/work/somedata.csv tab1 There are two cases to consider: (1) Table "tab1" does not previously ...
0
votes
1answer
60 views

How to get line that causes error when loading from csv to MySQL

I'm trying to load data from CSV file, but occurs error Error Code: 1366. Incorrect integer value: 'abcdxxx' for column 'col' at row 123545. I Have file with multiple breaklines CRLF's in content, ...
2
votes
1answer
1k views

MySQL Error when importing CSV with empty fields

I have CSV file with exported table, that has rows with fields that do not contain values. Columns are separated using "," and if fields have no values they look like that: ,,,,,, I tried to load data ...
0
votes
0answers
178 views

Export the pivot-table-with-dynamic-columns as CSV

Export the pivot-table-with-dynamic-columns as CSV. I Need to export the following Query As CSV. SELECT id, name, description,GROUP_CONCAT(if (DAYS='2015-01-01',AMOUNT,NULL)) As ...
0
votes
1answer
205 views

Uber-wide tables: Time to switch to Mongo?

As a web developer, I've typically only worked with nice, normalized tables in SQL-based RDBMS, but I'm doing some data consolidation for a researcher who will be analyzing correlations between all ...
1
vote
1answer
3k views

Import CSV or JSON file into DynamoDB

I have 1000 CSV files. Each CSV file is between 1 and 500 MB and is formatted the same way (i.e. same column order). I have a header file for column headers, which match my DynamoDB table's column ...
3
votes
3answers
1k views

Create a table from a CSV file with headers

I'm seeking to find a way to generate a new MySQL table solely based on the contents of a specified CSV. The CSV files I'll be using have the following properties; "|" delimited. First row ...
0
votes
2answers
581 views

import csv file into mysql with custom data change

I have a .csv file contains data like this: Username Password Email test123 123 test@foobar.com I'm currently using MySQL, and I have a table named user with some columns like this: ...
2
votes
1answer
162 views

Powershell Output Help

I have wriiten the following SQL script to execute using powershell. cls foreach ($svr in get-content "demo.txt") { $con = ...
1
vote
1answer
331 views

Postgresql csv to db translate foreign keys

I'm trying to import data from a csv to a postgresql database. the db table looks like this: CREATE TABLE texts( text_id serial PRIMARY KEY, topic_id integer REFERENCES topics, format_id integer ...
0
votes
1answer
524 views

MySQL output file location - accessing server files

I am running the MySQL Workbench 6.2 CE on Windows7. I have an output table of 200,000 rows and I need to save it. I will have to repeat this task, so I would like to iterate the following code: ...
0
votes
1answer
374 views

Import CSV file - dynamic path

I am trying to import a csv file dynamically. This works: BULK INSERT #CSV FROM 'C:\Users\MyName\Desktop\Players.csv' WITH ( FIELDTERMINATOR = ',', ROWTERMINATOR = '\n' ) I would like to ...
0
votes
1answer
106 views

Import csv data from localhost emacs SQLi error MySQL

I'm trying to import LOAD DATA LOCAL INFILE "/home/frederic/cowtest.csv" INTO TABLE cow_db1 FIELDS TERMINATED BY "," ENCLOSED BY '"' LINES TERMINATED BY '\n' IGNORE 1 LINES (state_abb, ...
2
votes
2answers
706 views

Importing CSV file using SQL Server Import and Export Wizard (SQL Server Express)

So I am having a heck of a time importing a CSV file. The ultimate goal is to create a repeatable process to import the file. The only way I've been able to import the file is in a roundabout way ...
1
vote
0answers
38 views

Any way to mitigate the large server load during LOAD DATA LOCAL INFILE operations?

I'm using MySQL LOAD DATA LOCAL INFILE to load csv files, and have noticed that during these loads, server output speed to other users diminishes eg long page download times, logins timeout. The LOAD ...
1
vote
0answers
132 views

Importing CSV Files with Date Columns

I am working on a project that involves importing data via Apex's data workshop. Two of my columns contain dates in the format YYYY-MM-DD HH:MI:SS. Can anyone tell me how to get Apex to import these ...
0
votes
0answers
403 views

Importing CSV into multiple tables using PostgreSQL

I have a very big CSV file with the following format: TAG,TIME,VALUE as an example row: footag,2014-06-25 08:00:00.0,3400.0 I used to import it easily inside PostgreSQL 9.3 using the following: ...
0
votes
1answer
292 views

SQLCMD - add date to CSV. When run inside Command Prompt it works, when in Job then %date

I've been battling for hours to add a date to a CSV name: For brevity, Im just taking the first character of the date here. In SQL Command, this works: sqlcmd -S localhost -d master -E -W -w 999 -s ...
0
votes
1answer
1k views

Import errors importing CSV to SQL Server table

I am using SQL Server 2014 Management Studio to import a very large .CSV file into a table. So far I have been trying to accomplish this by right-clicking on the database and selecting Import Data, ...
0
votes
1answer
133 views

Select IDs according to CSV file

I have a CSV file with IDs of rows. I want to use that to make a SELECT statement selecting the IDs within that CSV file. There is 1 million rows and I want to select about 95,000 of those. I want ...
1
vote
1answer
816 views

unable to import the file

Gone through the below link also but i am unable to import CSV file in mysql. Even i had tried by using > LOAD DATA LOCAL INFILE but same error persisting. Please help me in this. queries i tried had ...
1
vote
1answer
459 views

Load csv into MySQL database programmatically

I know about LOAD DATA INFILE command -- however, this requires that we already have the table with appropriate columns in place. When I have csv with hundreds of columns, it is not feasible to type ...
2
votes
5answers
1k views

Export data from a CCURE 800/8000 System using a pair of ODBC data sources?

I'm working on a security system called CCURE 800/8000 and trying to export some entrance / exit data from the Activity Monitor that logs when people use their badges to enter and exit the building. ...
0
votes
1answer
8k views

Using mysql's load infile to only populate certain columns

I have a csv file with a lot of data in it and I want to upload it into a mysql table. However, I would like to keep one column (primary id) empty so I can edit it myself. In mysql's documentation it ...
1
vote
0answers
115 views

Join and aggregate result and insert blanks for missing appendants

Consider these two simplified tables: CREATE TABLE "sources" ( "id" serial NOT NULL, "name" text NOT NULL, CONSTRAINT "sources_pkey" PRIMARY KEY ("id") ); CREATE TABLE "values" ( ...
2
votes
2answers
295 views

How can I get PostgreSQL to not advance sequences when COPY fails?

I'm importing CSV files into a relatively simple PostgreSQL database. (The CSVs are sometimes created manually from information in a book, sometimes created from spreadsheets with a little massaging ...
1
vote
0answers
195 views

Match unique id's on import- csv to sql

I have a csv file that I would like to import into a phpMyAdmin database (Wordpress). The CSV file is formatted as shown below: list-id | post_title | slider | ...
2
votes
0answers
3k views

sqlldr error - Invalid number

I am trying to load the following csv file into a table: TIMESTAMP ; SESSIONID;PROXY_SESSIONID; ACTION;USERNAME ;USERHOST ;OS_USERNAME ;CLIENT_ID ...