RE: EXPORTING results to CSV

2006-05-03 Thread George Law
try : 

select .  into outfile '/tmp/t3.csv' FIELDS TERMINATED BY ','  LINES
TERMINATED BY '\n' from table where .


This will create a file in the /tmp directory on the DB server itself

this doesn't do the column headings and your output file cannot already
exist.



 

-Original Message-
From: Cummings, Shawn (GNAPs) [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 03, 2006 2:45 PM
To: Mysql General (E-mail)
Subject: EXPORTING results to CSV


Is there a way to export the results to a text file (comma-delimited 
preferred)...

ie, SELECT * FROM TABLE  test.txt ; (obviously this doesn't work)  :)




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: EXPORTING results to CSV

2006-05-03 Thread Martijn Tonies

 Is there a way to export the results to a text file (comma-delimited 
 preferred)...
 
 ie, SELECT * FROM TABLE  test.txt ; (obviously this doesn't work)  :)

With our database developer tool that includes support for MySQL,
this is an easy task.

Check it out, Database Workbench: www.upscene.com

Martijn Tonies
Database Workbench - development tool for MySQL, and more!
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]