A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

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).

Filter by
Sorted by
Tagged with
0
votes
1answer
73 views

How to store data having a fixed number of columns and a variable number of rows

I have posted this question in the stack overflow site and a more experienced user than me suggested I post it here. I am quite new at collecting data and am collecting a new dataset using R from ...
0
votes
2answers
3k views

How to retrieve 'y' and 'n' comma separated values as 'yes' or 'no' from a single column

I have a table in a database with these columns id name facility_Type 1 Taluka y,n,n,y,n Now I want to retrieve the comma separated values like this id name Ambulance ward ...
0
votes
2answers
87 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
2answers
23 views

Ram & Concurrency: MySQL InnoDB LOAD INLINE FILE on 50 30GB CSV files

As the title suggests I'm moving around a lot of data. This is in an environment with a 24 core CPU and 2TB of M.2 storage. My first question is: given I have 16GB of ram, does that mean it's ...
0
votes
1answer
56 views

How to add multiple query results into one csv file?

By the help of the members of this community I have created a script which shows recent T-log backup for each database in the server. Instead of sp_MSforeachdb I used a customized script written by ...
0
votes
1answer
584 views

Importing CSV file into a PostgreSQL table

I am using Python with pandas to import a CSV file into a table in Postgres import pandas as pd import psycopg2 from sqlalchemy import create_engine df = pd.read_csv('products.csv', sep=';', ...
0
votes
2answers
529 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 ...
0
votes
1answer
64 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 ...
0
votes
1answer
529 views

How can I (re-)create the Entity Relationship Diagram (ERD) of an existing hidden Oracle database?

More precisely, I wan't to re-create the database model / schematics / the Entity Relationship Diagram (ERD) showing all the links between the tables of this existing hidden Oracle Database. In my ...
0
votes
1answer
2k views

Single value from a list of comma separated values when used in inner join in SQL Server

Can anyone please help me with a query to return a single value from a list of comma separated values when used in inner join. I can paste the example query here. select * from Test.dbo.Test1 ...
0
votes
1answer
589 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
1answer
242 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 ...
0
votes
1answer
36 views

Mysql output to csv putting column names on the bottom

I'm trying to export the results of the query listed below to csv and have the column names in the first row. However, when I run the code and open up the csv the header is listed as the last row. I ...
0
votes
2answers
48 views

How to automate the detection of the column type of a csv file for a table creation script?

I am new to pgAdmin and Azure database. I have a huge csv file with around 220 columns and I want to create a table out of it in pgAdmin4 to push it to Azure. However I don't know how to detect ...
0
votes
3answers
712 views

Leading zeros are truncated when I spool to CSV

I have spooled a file to CSV using sqlplus. Everything works great but there is one issue. I have mobile numbers which start with 0, for example 04589 and 02586. After the spooling is complete, 0s ...
0
votes
1answer
400 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
572 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
1answer
545 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.
0
votes
2answers
759 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
1answer
5k 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
2answers
2k 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 ...
0
votes
2answers
472 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 ...
0
votes
1answer
767 views

Invalid directory path error while connecting to database

I am using oracle 11g and using sqldeveloper to run/edit queries. My table is: ID FIRST_NAME LAST_NAME MAJOR CURRENT_CREDITS 10008 A Dd Computer ...
0
votes
1answer
491 views

SSIS - XML with row delimiter to a single column of a SQL table

I'm trying to upload data from a CSV file into a SQL server table through SSIS package (Flat File source and OLEDB destination). This CSV has comma as column delimiter and {CR}{LF} as row delimiter. ...
0
votes
1answer
1k views

Migrating data from Firebird to CSV on OSX

I have a .gdb Firebird database file that I would like to partially transform to .csv. From the CLI tool, I'm able to do the following: CONNECT "/Users/jpmonette/Desktop/file.gdb"; OUTPUT /Users/...
0
votes
1answer
3k views

Line-breaks in Text column of CSV file

I have come across an awkward situation where I have got CSV files with | as the column delimiter. In these files, I don't have Text column qualifier. (i.e. "). My problem is when I am importing these ...
0
votes
1answer
314 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
370 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 ...
0
votes
2answers
3k views

problems when importing csv files into SQL Server using SSIS when the columns are not consistent from quarter to quarter

I am using SSIS to upload a bunch of csv tables into SQL Server Express. The csv files are quarterly data files. They are largely consistent but every couple of years a column may be added or an ...
0
votes
2answers
6k 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
758 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

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
0answers
7 views

MySQL 8.0 appending unknown character to column

I'm inserting a CSV files into MySQL 8.0 using Python 3.7: bulk_insert_sql = "LOAD DATA LOCAL INFILE filename.csv INTO TABLE table_name FIELDS TERMINATED BY '|' LINES TERMINATED BY '\n' IGNORE 1 ...
0
votes
0answers
25 views

LOAD DATA INFILE NULL are enclosed not loaded

I have a CSV file that I exported from Oracle database. All the integer columns are not enclosed, but all the string columns are enclosed with " I'm using MySQL 8. So I used the following command to ...
0
votes
0answers
30 views

Collect a column as CSV in GroupBy

I have this schema: Result Story: BILL_INFO has all bill headers. There is a business process called Deposit that occurs once a day: BILL_INFO are updated with a DEPOSIT_ID from DEPOSIT_INFO table ...
0
votes
0answers
30 views

Import folder with Multiple CSV's into SSMS w/ out SSIS

I am wondering what's the best and most effective way to import csv's stored in a local folder into DB w/ in SSMS. Folder path- C:\Users\ngutierrez\Desktop\Open_Air_Tables Folder contains about 30 ...
0
votes
0answers
8 views

Allow only import table in phpmyadmin

We build a wordpress site as a database interface in localhost (only). We are using a plugin WpDataTables to display tables, statistics etc. Is it possible to expose somehow only the import option of ...
0
votes
0answers
60 views

Errors with trying to run a stored procedure with local file output

I'm trying to run a stored procedure that I'm passing some variables to. The output is being writted to a CSV file on a local file share. The CSV file gets created, but I'm hitting some errors ...
0
votes
0answers
21 views

RDDs, Maps and Apache Spark

I have been playing around with Apache Spark, firstly I learned PostgreSQL and I have a few queries that I needed to run on Spark. I managed to run them as SQL Strings in Spark SQL, but now I have to ...
0
votes
1answer
27 views

Best practices for storing multiple SQL tables per user (built from uploaded csv file?)

I have a few users who will be uploading a few types of predefined CSV files. I need to store these as sql tables to be able to run queries on this data for a particular user, however that means there'...
0
votes
0answers
42 views

Can I force a LOAD DATA LOCAL statement to abort if an error is not loaded?

I am trying to load a CSV file into a MySQL table with the load data local statement. After loading it, the statement reports Query OK, 1030 rows affected, 7314 warnings (0.03 sec) Records: 1043 ...
0
votes
0answers
117 views

Writing CSV directly to a BYTEA column from PostgreSQL tables

Assuming these two tables: CREATE TABLE data (day DATE, kpi INTEGER); CREATE TABLE reports (csv BYTEA); Is it possible to (pseudocode): INSERT INTO reports (csv) (SELECT to_csv(SELECT day, kpi FROM ...
0
votes
1answer
20 views

Load flat file into a predetermined table

Scenario Table created Data in flat file loaded to the table but with errors. please advise how to fix it (a) 'address' is split to 3 columns causing mismatch between the source and destination (b)...
0
votes
2answers
891 views

MongoDB CSV Export: One Array/Column & Array Index on rows, or vice versa

I have a MongoDB schema that looks like this: const batchSchema = mongoose.Schema({ _id: mongoose.Schema.Types.ObjectId, time: {type: [Number]}, tmp: {type: [Number]}, hum: {type: [Number]}, ...
0
votes
1answer
36 views

csv engine and mysql start

my question is about speed when perform service mysql start. with many tables (some not often used). what engines consumes more or less start time ? example: innodb --> the more tables, the more ...
0
votes
0answers
222 views

MySQL automatic import of (huge) csv files fails using mysqlimport

For testing purposes, I have to insert large Time Series data on a MySQL database, running on a Windows remote server. Firstly, the (very basic) table: CREATE TABLE 'sensor_data' ( '...
0
votes
0answers
35 views

mysql: make the server fail instead of just giving warnings

I have a mysql 5.7 server. I am trying to import some .csv files. Sometimes it may so happen that these are malformed. Here is a sample case: - 'mysql: [Warning] Using a password on the command ...
0
votes
1answer
134 views

csv import fails without throwing an error

Ι am trying to import a csv file into an existing mysql 5.7 table. Here is the command (the db is in docker with bind mount for persistence) mysql -h 127.0.0.1 -uroot -prootpass --local_infile=1 ...
0
votes
1answer
114 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
4answers
309 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 ...