Skip to main content

Questions tagged [into-outfile]

MySQL's `SELECT ... INTO OUTFILE` command lets you quickly dump the results of a MySQL query into a file on the MySQL server. It generally should not be used for production use.

into-outfile
0 votes
0 answers
27 views

MYSQL - INTO OUTFILE change permissions of generated file

Using MYSQL in docker env, I'm trying to export the results of my query into a file. I've verified that the file is exported in the right folder considering --secure_file_priv option. Here is how the ...
G.Sannier's user avatar
0 votes
0 answers
27 views

MySQL select into outfile formatting for CSV

I'm trying to do a select into outfile to a CSV. My table values can contain characters like \r, \n, comma, "(double quotes) Now MySQL does not seem to handle all the above characters efficiently ...
Shub's user avatar
  • 265
1 vote
0 answers
185 views

How to create CSV file instead of .PART file in SELECT INTO OUTFILE S3

I'm using SELECT INTO OUTFILE S3 command to move output of queries to an S3 bucket via a Stored Procedure. The front-end application has to read these files and show them on the screen. But, the ...
SpikeLee235's user avatar
0 votes
0 answers
56 views

MYSQL optionally enclosed by not working correctly

Good morning. If I run this procedure the "optionally enclosed by" option also puts the data and decimal fields between "" (I checked on db and cls.DATA_INIZIO, cls.DATA_FINE are ...
Fabio's user avatar
  • 1
0 votes
0 answers
116 views

Updating to MariaDB 10.6.12 broke my query

I recently upgraded my web server, which also upgraded my MariaDB server. I have a script I've used for several years that takes a CSV file, parses it for specific info, and loads that into a new csv ...
Kevin Moody's user avatar
1 vote
1 answer
29 views

MySql naming the automatically downloaded CSV file using first and last date

MySql query gives me data from the 2020-09-21 to 2022-11-02. I want to save the file as FieldData_20200921_20221102.csv. Mysql query SELECT 'datetime','sensor_1','sensor_2' UNION ALL SELECT ...
Mainland's user avatar
  • 4,514
0 votes
0 answers
42 views

MySql produced CSV file has all columns stacked in the first column

My MySql query is working fine and I am getting CSV output. The problem is the CSV file columns look like stacked in a single cell. I have total 24 columns. I confirmed it by opening in the Python and ...
Mainland's user avatar
  • 4,514
0 votes
0 answers
70 views

MYSQL - Export data into outfile with pivot-table query

I wrote a script that gather the space used by multiple datasets. My database looks like the below: Date_and_Time Server_Name_and_Drive Space_Used_(Gb) 08/04 00:00 SERVER3 D DRIVE 220 08/04 00:00 ...
Nicolas-V13's user avatar
-2 votes
1 answer
60 views

Write to OUTFILE with Procedure and Event - MySQL

Could someone help me with what is wrong with the below please? DELIMITER $$ CREATE DEFINER=`user1`@`localhost` PROCEDURE `Local_sp_ExtractPOI`() BEGIN SET SESSION group_concat_max_len = 1000000; ...
MrrMan's user avatar
  • 158
-2 votes
1 answer
99 views

Get path from VBscript variable to use with obj.sql(extQuery) extQuery = select * from table name into outfile '????' [duplicate]

I have this code i need to retrieve a path from a VBScript variable and use it with a mysql query. set fso = WScript.CreateObject("Scripting.FileSystemObject") Mypath = fso....
DoomneT's user avatar
0 votes
0 answers
39 views

Using Prepare Statement in mysql [duplicate]

I wrote the following code in mysql_workbench which is connected to AWS RDS; I've changed my RDS parametergroup to the proper value and also modified the server connection to have "...
Elham's user avatar
  • 9
0 votes
0 answers
369 views

Multiple Select into outfile

I m trying to run a query in HeidiSQL. If I run only one SELECT statement, everything works fine. If I want to run multiple SELECT statements I keep getting SQL error 1064 Any ideas what to change to ...
Edwin Coenen's user avatar
1 vote
1 answer
268 views

MySQL loop statement over column with INTO OUTFILE unique name

I have a database with few tables, but we are really interested in two. In the first one I have data with id's assigned to it. In the second I have chosen id's. What I'm trying to do is to run in a ...
Chris's user avatar
  • 87
0 votes
1 answer
25 views

INTO OUTFILE concatenating columns

I am running the below query in MYSQL: SELECT 'id','uuid','progid','progname','priority','proglist' UNION SELECT programtbl.id,programtbl.uuid,programtbl.progid,programtbl.progname,programtbl.priority,...
Rick's user avatar
  • 1,520
0 votes
1 answer
1k views

Using concat() in INTO OUTFILE gives me error code 1064

I'm trying to execute a query and export its results to a csv file with a formatted current_timestamp in its file name. The query itself (excluding from INTO OUTFILE and onwards) executes just fine. ...
codaamok's user avatar
  • 737

15 30 50 per page
1
2 3 4 5
10