Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [csv]

Questions on how to import into, extract data from, or exchange data between databases in CSV format (plain text using commas to separate values).

0
votes
1answer
28 views

listagg in order and including a sequence of separator when missing any row of a sequence

Sorry for the long title but it's a little bit difficult to explain. We have a table | N rows | Atrib1 | Atrib2 | Atrib3 | Atrib4 | Final row | --------------------------------------------------...
0
votes
0answers
20 views

using “LOAD DATA” with CSV files

I have created several CSV files. They use the standard comma (,) for field separation, and the fields are enclosed in quotations marks ("). This works fine except for fields that contain commas. My ...
0
votes
2answers
27 views

SQL Server Agent - Do not show job step details and column headers in output file

I have a SQL Server Agent job which runs a select statement on a schedule and appends results to a CSV file (Right click the job --> properties --> advanced and then adding a file path to the output ...
1
vote
1answer
51 views

How to automate CSV-exports of queries in PL/SQL Developer (Oracle)?

I'm no pro in Oracle or PL/SQL Developer (I mostly use and admin mySQL and MS SQL Server). I'm not an admin of any sort, but have read access to many tables in Oracle via PL/SQL Developer. I need ...
5
votes
2answers
369 views

How to import CSV file in SQL server 2008?

I am trying to import a CSV file in SQL Server 2008. BULK INSERT is a way to go but it is applicable for CSV from SQL Server 2014 onwards. What would be an alternative way to achieve this goal? Any ...
-1
votes
1answer
36 views

Copy in SQL with index vs without index

Recently I have received a data dump in csv format that I am trying to import in my PSQL database. The dump consists of 8 csv file each of size 7GB. I have found that using the Copy command on one ...
0
votes
0answers
11 views

Interpreting data from flat text logs

I'm not sure if this question is "in scope" for this Stack site; and if not, I'd appreciate any pointers before the question is deleted. My question relates to the best way to extract useful data ...
2
votes
1answer
51 views

Handling variable fields in a CSV file with JSON?

Im trying to figure out the engineering to get a CSV file into PostgreSQL. Requirements: The CSV has X number of predetermined required fields The CSV file has Y number of dynamic fields Example: ...
0
votes
4answers
100 views

SSIS deployment failed - working with files

I've developed a simple SSIS package that will open a csv file, select a number of column, add two derived columns and then copy the results to a file. This works within visual studio (even if it ...
0
votes
1answer
410 views

Upload multiple csv file to multiple tables sqlServer

I have over than 200 csv files that each of them is diffrent table. I create now a new DB and want to upload them all so I will have all the table. I not accessable to old DB to backup in diffrent ...
-3
votes
1answer
239 views

Bulk Insert csv file error [closed]

I am trying to BULK INSERT a csv file to my SQL Server. Using code I found on this SO question, I ran: BULK INSERT Temp FROM 'c:\csv\student.csv ' WITH ( FIELDTERMINATOR = ',', ...
0
votes
0answers
27 views

Using psql, echo copy and import a pipe deliminated file

I'm writing a batch script, and batch doesn't like |, heck nor does command line entries. The only way I can input this command is to initiate a psql login directly and then issue it, which ruins the ...
1
vote
1answer
171 views

How to upload multiple csv files to sql server without constrains

I backed up an old SQL Server DB with .CSV files for each table. The old DB is now gone; the .CSV files are all I have. Now I want to create new DB and upload all those csv file (my old db removed) . ...
2
votes
1answer
40 views

How do I bulk load data and still provide row-by-row feedback?

We want to allow our users to import CSVs containing many thousands of records to "pre-load" a particular table in our system. It's not strictly a one-time operation, it may be performed multiple ...
2
votes
1answer
181 views

postgresql - Importing CSV Data with Custom Type

I'm mostly a newcomer to databases and am building a postgres database of student achievement in a series of courses. My database uses a type called "class" that consists of the course, the academic ...
1
vote
2answers
486 views

How to dump to csv valid json with Postgresql?

I am trying to dump some data as json with: \copy (SELECT json_build_object('areaSqft',area_sqft, 'titleNos',title_nos, 'buildingIds',building_ids, 'geometry',geom_json) FROM my_data) to my_data.csv ...
0
votes
0answers
954 views

How to import a CSV into Postgres using Python ORM?

This is my CSV file: https://i.stack.imgur.com/5okaX.png This is my code : from numpy import genfromtxt from sqlalchemy import Column, Integer, Float, Date, VARCHAR from sqlalchemy.ext.declarative ...
1
vote
2answers
93 views

How to split a string on every 2nd delimiter?

I have curves consisting of X/Y points (an array?) stored in a string with the same delimiter. There is 1 curve per row. Below is a simple example: 0,0,1,1,2,1.9,2.9,2.8,3.6,3.5 I want to extract ...
0
votes
1answer
180 views

Set columns dinamically in UTL_FILE

I've been stuck with this problem, so I'm looking for help now. I'm trying to get a .cvs file from a query with PL/SQL. I'm using a cursor and UTL_FILE to achieve that. The problem is that I have to ...
0
votes
1answer
206 views

Finding Columns causing errors in SQL Developer

I'm relatively new to Oracle SQL and trying to import CSVs using SQL Developer. I've been getting errors such as Insert failed for rows 1351 through 1400 ORA-01438: value larger than ...
0
votes
2answers
224 views

How to connect from local computer (mac) to remote Oracle DB and execute script and save results to CSV?

I can connect to remote Oracle DB using this signature: sqlplus 'user/pass@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=hostname.network)(Port=1521))(CONNECT_DATA=(SID=remote_SID)))' Now want to ...
0
votes
0answers
191 views

How to import a varbinary column with bcp?

In my current project I have to import data to SQL server. The exported data is CSV file and binaries. The CSV file contains data in the format below UniqueID_BinaryFileName All binary files ...
-1
votes
1answer
257 views

Export only certain column on single table to csv format

I need to export certain column only of a database table to csv file. Here is the format of the source: ID | user_email | user_login | user_nickname | usergroup | address | user_registered | ...
0
votes
0answers
51 views

how to import a 5GB CSV file into MapD Core?

what's the best way to import a 5GB CSV file that's on my laptop into a MapD Core running on another server? I can figure out the schema, but I would really like a method that detects a reasonable ...
1
vote
1answer
318 views

Oracle XMLAGG issue with combining cells that have comma separated values in cells

Have a situation where I'm trying to use xmlagg to get: | ID | name row1 | 1 | apple row2 | 1 | apple,pear,banana row3 | 1 | apple,banana row4 | 1 | pear,banana,orange row5 | 2 | orange ...
0
votes
2answers
2k views

how to import a huge csv file into Cassandra?

I am trying to import a csv file into Cassandra which is very long. These are food products: ingredients, nutrition, labels... It comes from Open Food Data. List information on food products: ...
1
vote
1answer
20 views

How to relate LatLong and State columns on PowerBI

I have two separate tables, one with latitude and longitude columns (for locations in the USA), and the other with the US state abbreviation (TX, AZ, CA, etc). Is there a way to count the number of ...
2
votes
1answer
82 views

PostgreSQL: simple equality query returning no results for indexed columns

I have a very large table (around 140M rows) with five columns: CREATE TABLE IF NOT EXISTS citations ( citing_id text, citing_issn text, cited_id text, cited_issn text, year int ); ...
3
votes
1answer
486 views

T-SQL: CSV->table pipeline with custom parsed numeric data, lookup values

Problem Wish to insert thousands of records into a table [Child] from a CSV file (and do this from tens of files into the same table). However, I want to A. substitute a lookup value into the table (...
3
votes
1answer
127 views

Dynamic paths for postgres file_fdw (csv)

I've got a postgres database which relies on the use of foreign tables to support the loading of large data sets based on user-provided (system sanitized) tables. I'd use COPY, but the tables loaded ...
6
votes
2answers
801 views

Very large SQL Server 2016 result sets (over 75 GB) to a CSV file?

What is the best way to get very large SQL Server 2016 result sets (over 75 GB) to a CSV file? The engineers need this output to look for correlations. The bcp route for a 73.5 GB file filled up ...
2
votes
1answer
6k views

Import Data from 48 GB csv File to SQL Server

I am importing huge data file of size around 48 gb using SQL Server default Import Tool. It keeps on executing fine for app. 13000000 Row insertions but after it the Task Fails with following error. ...
0
votes
1answer
190 views

select distinct on csv data

A table has CSV data and I want to do a SELECT DISTINCT ID on that table, how should I proceed? +-----------+ | id | +-----------+ | 111,1487 | +-----------+ | 462 | +-----------+ | ...
1
vote
1answer
97 views

Why does my database structure and SELECT operations generate NULLs?

I'm not too experienced with database problems, so please excuse the wall of text, I believe the context is important to understand the problem and goal. I receive a CSV file from another system ...
0
votes
1answer
56 views

How to fetch records from table which has csv

Please guide me about following case. I need to fetch records from a table which has a column like shown in the picture. I need to fetch records which has 065 and AMT campaigns only. I tried: SELECT ...
1
vote
0answers
284 views

Which method gives better insert performance in mysql db table: CSV import or insert statement

I have combine data from two tables which results in 6727224 rows. I want to insert this data into another mysql db table. Which method should be very fast to insert this number of records. Insert ...
0
votes
1answer
349 views

SQL server Import CSV file - 1'st row is also added as s column name

I'm trying to import a CSV file using import export wizard, Im facing an issue. The first row is also added as a column name. Import wizard: The highlighted area is my 1'st row.
1
vote
1answer
2k views

MySQL: Load csv file to mysql

I'm having problems when loading a csv file into MySQL 5.7 with MySQL Workbench. Example Data ESH13 1/2/2013 10:04:35 1451 1 ESH13 1/2/2013 10:04:35 1451.25 2 ESH13 1/2/2013 ...
2
votes
1answer
1k views

How to safely populate pg_notify payload?

Data makes its way into my application with prepared statements and stored procedures, so I'm not too worried about injection. When a new user signs up, I want to send an activation email. Presently I'...
0
votes
2answers
42 views

Specify Import Row Range for SQL Server Task Wizard

I would like to import a csv file into an empty table in SQL Server Developer 2016, using Task Wizard. I know with BULK INSERT there are options to specify firstrow and lastrow; does Import Wizard ...
0
votes
2answers
283 views

MySQL Import & Replace via CSV

I have a MySQL database table named items with 10,000+ records. Of these records, I would like to export only records where item_isbn IS NULL. SELECT * FROM Items WHERE item_isbn IS NULL produces a ...
0
votes
2answers
67 views

Using Structured Filetypes as Databases

In having a debate with a coworker it was posed that a flat file, in this case a CSV, could be considered a database. This would include XML and JSON as well. I'm interested in differing views on this....
0
votes
1answer
3k views

How to export data in Oracle database into CSV file with UTF-8 format?

I have an CSV file with WE8ISO8859P1 encoding generated from Oracle Stored Procedure. Is there any script line to define the output of CSV file in UTF-8 encoded format? CREATE OR REPLACE PROCEDURE ...
0
votes
1answer
505 views

Fast way to import 2GB csv file into SQL Server 2008

I am new to database,I am using SSMS 2008 R2 to import 2GB of data from a .csv file. It is taking around 115mins to import. Can anybody let me know any better way to perform this import.
0
votes
0answers
3k views

How to fix “The ConnectionString property has not been initialized” Error?

I am a researcher who worked for years on MS-Access databases, but I am very novice in using SQL server, I have just installed MS-SQL Server 2016 Dev edition to migrate my Access database, I ...
0
votes
2answers
1k views

How to SELECT with two CSV files/… on PostgreSQL? [closed]

I have two CSV files which you can insert into the following PostgreSQL schema. However, I cannot \COPY the data into the tables. Pseudocode Let data_id=1 Show name and event_value from data.csv and ...
3
votes
2answers
65 views

Generate CSV Email For Each UserID In Table

Good day all, I have a unique requirement where I need to generate a .csv file containing data for each userID. The result set that I have returned from my select statement is userID ...
5
votes
1answer
2k views

Order the result of a comma separated string generated with STUFF

Given a schema like this: CREATE TABLE Foo ( Id int PRIMARY KEY, Position int NOT NULL, Title varchar(10) NOT NULL ); INSERT INTO Foo VALUES (1, 3, 'Title3'), (2, 10, 'Title10'), (3, 1, ...
5
votes
2answers
2k views

Select a CSV string as multiple columns

I'm using SQL Server 2014 and I have a table with one column containing a CSV string: 110,200,310,130,null The output from the table looks like this: I want to select the second column as multiple ...
0
votes
2answers
162 views

How do I import updates to unique data in MySQL

I have a reasonably large MySQL database that is an import of CSV values from a public data repository. It has come to my attention lately that they occasionally update (ie. correct) data, usually ...