Re: Exporting the result of a Query into excel

2010-01-05 Thread Jay Ess
ishaq gbola wrote: Hi all, I would like to know if there is a tool or command in mySQL that allows one to export the result of query into excel formart select * from table into outfile thefile.txt; That can be imported into excel using CSV and using TAB as separator.

Re: Exporting the result of a Query into excel

2010-01-05 Thread Jim Lyons
You can use the --xml option to the mysql command to get xnl output. You can also get a tab-delimited output file that can be read into Excel (this is what I usually do). To get a tab-delimited file, you can use the --tab option of mysqldump or start up the mysql program with the -sss option and

Re: Exporting the result of a Query into excel

2010-01-05 Thread ishaq gbola
Thanks a lot for that, but where does this file get saved in and how can i copy it to my local host if the database is on a remote server --- On Tue, 5/1/10, Jay Ess li...@netrogenic.com wrote: From: Jay Ess li...@netrogenic.com Subject: Re: Exporting the result of a Query into excel To:

Re: Exporting the result of a Query into excel

2010-01-05 Thread Jay Ess
ishaq gbola wrote: Thanks a lot for that, but where does this file get saved in and how can i copy it to my local host if the database is on a remote server If you don't specify the absolute location it can be find in DATADIR/DatabaseName/. And after you located the file you have a

Re: Exporting the result of a Query into excel

2010-01-05 Thread sureshkumarilu
Hi What is the OS you are using on the remote and local server. Is there a mysql client on local server? Thanks Suresh Kuna Sent from BlackBerry® on Airtel -Original Message- From: ishaq gbola ishaq...@yahoo.co.uk Date: Tue, 5 Jan 2010 13:31:59 To: mysql@lists.mysql.com Subject: Re:

Re: Exporting the result of a Query into excel

2010-01-05 Thread ishaq gbola
Am running windows on my local host and Redhat linux on the remote server, I have no mysql client on local host. TAC for the NMS using the database adviced me not to use a msqlclient for it, that it could break the database??? --- On Tue, 5/1/10, sureshkumar...@gmail.com

Re: Exporting the result of a Query into excel

2010-01-05 Thread ishaq gbola
As test i tried this and I got the result below mysql show tables into outfile trial.txt     - ; ERROR 1064: You have an error in your SQL syntax.  Check the manual that corresp  onds to your MySQL server version for the right syntax to use near 'into outfile

Re: Exporting the result of a Query into excel

2010-01-05 Thread sureshkumarilu
Ok. In windows, Use winscp tool, connect to the server and copy the file to local machine and import it in excel. Thanks Suresh Kuna Sent from BlackBerry® on Airtel -Original Message- From: ishaq gbola ishaq...@yahoo.co.uk Date: Tue, 5 Jan 2010 13:42:20 To: mysql@lists.mysql.com

Re: Exporting the result of a Query into excel

2010-01-05 Thread sureshkumarilu
We have to use outfile with select stmt, not with show. Suresh Kuna Sent from BlackBerry® on Airtel -Original Message- From: ishaq gbola ishaq...@yahoo.co.uk Date: Tue, 5 Jan 2010 13:45:44 To: mysql@lists.mysql.com Subject: Re: Exporting the result of a Query into excel As test i tried

Re: Exporting the result of a Query into excel

2010-01-05 Thread Jim Lyons
A command to convert the table mytab in database mydb into a tab-delimited file mytab.txt might be: mysql -e'select * from mydb.mytab' -sss mytab.txt The -sss is necessary to remove all the formatting stuff that you normally have in the output of a select statement. An alternative, if you

Re: Exporting the result of a Query into excel

2010-01-05 Thread Michael Dykman
TAC for the NMS using the database adviced me not to use a msqlclient for it, that it could break the database??? You are being given a false argument. If the application which connects to MySQL is running on that windows box then there already is a MySQL client on that machine, albeit a

Re: Exporting the result of a Query into excel

2010-01-05 Thread Carsten Pedersen
Is there any particular reason not to use the MySQL ODBC driver to import the data directly into Excel? / Carsten Jim Lyons skrev: A command to convert the table mytab in database mydb into a tab-delimited file mytab.txt might be: mysql -e'select * from mydb.mytab' -sss mytab.txt The -sss

Re: Exporting the result of a Query into excel

2010-01-05 Thread Lawrence Sorrillo
Carsten: Can you demonstrate this? ~Lawrence Carsten Pedersen wrote: Is there any particular reason not to use the MySQL ODBC driver to import the data directly into Excel? / Carsten Jim Lyons skrev: A command to convert the table mytab in database mydb into a tab-delimited file

Re: Exporting the result of a Query into excel

2010-01-05 Thread Jim Lyons
Doesn't that depend on how often you want to do it? If it's a one-time thing or an occasional thing, it's easier to just dump the table into a tab-delimited file. If it's something you want to do on a regular basis, ODBC is a way you might prefer to go. But it also would require you to have the

RE: Exporting the result of a Query into excel

2010-01-05 Thread Jason Trebilcock
-Original Message- From: ishaq gbola [mailto:ishaq...@yahoo.co.uk] Sent: Tuesday, January 05, 2010 7:18 AM To: mysql@lists.mysql.com Subject: Exporting the result of a Query into excel Hi all, I would like to know if there is a tool or command in mySQL that allows one to