Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Save MySQL query results into a text or CSV file

Author  Topic 

kt
Yak Posting Veteran

88 Posts

Posted - 2013-04-19 : 15:44:29
I found this topic from this link:
http://www.tech-recipes.com/rx/1475/save-mysql-query-results-into-a-text-or-csv-file/

I am try to create the text file from my table but it didn't work with this error: "Incorrect syntax near the keyword 'INTO'.
Does any know? What should i do? - thx

SELECT sale, del
FROM order
INTO OUTFILE 'C:/tmp/orders.csv'
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n'

robvolk
Most Valuable Yak

15732 Posts

Posted - 2013-04-19 : 16:00:49
SQLTeam is a Microsoft SQL Server website, you're better off asking in a MySQL forum. There's one here: http://dbforums.com/
Go to Top of Page
   

- Advertisement -