SELECT <rest of query> into OUTFILE "<some place the mysql user can write to">
Should get you a tab delimited file there are more options for using different delimiters and field encapsulations, etc. Its in the manual. curtis On Sun, 29 Feb 2004, Joshua Beall wrote: > Hi All, > > I am wondering if anyone can point me to a utility that will let me dump > the > result of a MySQL query to a file I can open in MS Excel or (preferably) > OpenOffice.org Calc. > > phpMyAdmin lets you do this if you want to dump a "SELECT * FROM > <table>", > but if I want to fine tune it I cannot (unless I am missing something) > > MySQL CC lets me save the result of a query to a test file "right > click->save results", but this format does not quite conform to either > Excel > or Calc's text format. I could fix it by hand, but before I would do > that, > I think I would write a PHP script that would generate the right output. > > But before I spend any time working on doing that, I am wondering if > anyone > knows of a way to do this already? > > I am running MySQL 4.0.12-standard on Mandrake 9.2 on the server, and my > workstation is an XP Pro box. I use MySQL CC 0.9.1-beta and phpMyAdmin > 2.5.0, but am completely willing to upgrade more recent versions of > either > of these tools, or try a new one. > > Thanks for any feedback! > > Sincerely, > -Josh > > p.s. How do I use my newsreader to post to these mailing lists? I see > that news.gmane.org seems to carry the mysql lists, but it would not let > me post, telling me (even after I was subscribed to the list with the > same email address I use in my newsreader): > > Outlook Express could not post your message. Subject 'Dumping MySQL > result set to a spreadsheet', Account: 'news.gmane.org', Server: > 'news.gmane.org', Protocol: NNTP, Server Response: '441 You are not > allowed to approve postings', Port: 119, Secure(SSL): No, Server Error: > 441, Error Number: 0x800CCCA9 > > > -- -- Curtis Maurand mailto:[EMAIL PROTECTED] http://www.maurand.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]