Exporting the result of a Query into excel

Exporting the result of a Query into excel

am 05.01.2010 14:17:57 von ishaq gbola

--0-1891122999-1262697477=:95654
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

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
=0A
--0-1891122999-1262697477=:95654--

Re: Exporting the result of a Query into excel

am 05.01.2010 14:22:23 von 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.
http://code.anjanesh.net/2007/12/export-mysql-data-to-excel- compatible.html

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org

Re: Exporting the result of a Query into excel

am 05.01.2010 14:27:49 von Jim Lyons

--0016e6d64b18e1267c047c6acdae
Content-Type: text/plain; charset=ISO-8859-1

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 do a select on the data
you want, redirecting it into an output file.

On Tue, Jan 5, 2010 at 7:17 AM, 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
>
>
>
>




--
Jim Lyons
Web developer / Database administrator
http://www.weblyons.com

--0016e6d64b18e1267c047c6acdae--

Re: Exporting the result of a Query into excel

am 05.01.2010 14:31:59 von ishaq gbola

--0-1009217372-1262698319=:21742
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

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 wrote:

From: Jay Ess
Subject: Re: Exporting the result of a Query into excel
To: "mysql@lists.mysql.com >> Mysql"
Date: Tuesday, 5 January, 2010, 13:22

ishaq gbola wrote:
> Hi all,
>
> I would like to know if there is a tool or command in mySQL that allows o=
ne to export the result of query into excel formart
>  =A0
select * from table into outfile "thefile.txt";
That can be imported into excel using CSV and using "TAB" as separator.
http://code.anjanesh.net/2007/12/export-mysql-data-to-excel- compatible.html

--=20
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:=A0 =A0 http://lists.mysql.com/mysql?unsub=3Dishaqgbo@yahoo.=
co.uk

=0A
--0-1009217372-1262698319=:21742--

Re: Exporting the result of a Query into excel

am 05.01.2010 14:35:57 von 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
multitude of choice how to transfer the file. scp,ftp,http,mail all
depending on what's installed on the server and what access you got to it.



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org

Re: Exporting the result of a Query into excel

am 05.01.2010 14:37:13 von sureshkumarilu

SGkNCldoYXQgaXMgdGhlIE9TIHlvdSBhcmUgdXNpbmcgb24gdGhlIHJlbW90 ZSBhbmQgbG9jYWwg
c2VydmVyLg0KSXMgdGhlcmUgYSBteXNxbCBjbGllbnQgb24gbG9jYWwgc2Vy dmVyPw0KDQpUaGFu
a3MNClN1cmVzaCBLdW5hDQpTZW50IGZyb20gQmxhY2tCZXJyea4gb24gQWly dGVsDQoNCi0tLS0t
T3JpZ2luYWwgTWVzc2FnZS0tLS0tDQpGcm9tOiBpc2hhcSBnYm9sYSA8aXNo YXFnYm9AeWFob28u
Y28udWs+DQpEYXRlOiBUdWUsIDUgSmFuIDIwMTAgMTM6MzE6NTkgDQpUbzog PG15c3FsQGxpc3Rz
Lm15c3FsLmNvbT4NClN1YmplY3Q6IFJlOiBFeHBvcnRpbmcgdGhlIHJlc3Vs dCBvZiBhIFF1ZXJ5
IGludG8gZXhjZWwNCg0KVGhhb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aW5nIExpc3QNCkZvciBsaXN0IGFyY2hpdmVzOiBodHRwOi8v bGlzdHMubXlzcWwu
Y29tL215c3FsDQpUbyB1bnN1YnNjcmliZTqgIKAgaHR0cDovL2xpc3RzLm15 c3FsLmNvbS9teXNx
bD91bnN1Yj1pc2hhcWdib0B5YWhvby5jby51aw0KDQoKCgoNCg==

Re: Exporting the result of a Query into excel

am 05.01.2010 14:42:20 von ishaq gbola

--0-892719561-1262698940=:8963
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

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 ad=
viced me not to use a msqlclient for it, that it could break the database??=
?=20

--- On Tue, 5/1/10, sureshkumarilu@gmail.com wro=
te:

From: sureshkumarilu@gmail.com
Subject: Re: Exporting the result of a Query into excel
To: "ishaq gbola" , mysql@lists.mysql.com
Date: Tuesday, 5 January, 2010, 13:37

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=AE on Airtel

-----Original Message-----
From: ishaq gbola
Date: Tue, 5 Jan 2010 13:31:59=20
To:
Subject: Re: Exporting the result of a Query into excel

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 wrote:

From: Jay Ess
Subject: Re: Exporting the result of a Query into excel
To: "mysql@lists.mysql.com >> Mysql"
Date: Tuesday, 5 January, 2010, 13:22

ishaq gbola wrote:
> Hi all,
>
> I would like to know if there is a tool or command in mySQL that allows o=
ne to export the result of query into excel formart
>  =A0
select * from table into outfile "thefile.txt";
That can be imported into excel using CSV and using "TAB" as separator.
http://code.anjanesh.net/2007/12/export-mysql-data-to-excel- compatible.html=
=0A

--=20
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql=0A
To unsubscribe:=A0 =A0 http://lists.mysql.com/mysql?unsub=3Dishaqgbo@yahoo.=
co.uk=0A





=0A
--0-892719561-1262698940=:8963--

Re: Exporting the result of a Query into excel

am 05.01.2010 14:45:44 von ishaq gbola

--0-478969647-1262699144=:10702
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

As test i tried this and I got the result below

mysql> show tables into outfile "trial.txt"
  =A0 -> ;
ERROR 1064: You have an error in your SQL syntax.=A0 Check the manual that =
corresp=A0 onds to your MySQL server version for the right syntax to use ne=
ar 'into outfile                =A0=A 0=A0=
                =A0 "trial.txt"' at line 1
mysql>


--- On Tue, 5/1/10, Jay Ess wrote:

From: Jay Ess
Subject: Re: Exporting the result of a Query into excel
To:=20
Cc: mysql@lists.mysql.com
Date: Tuesday, 5 January, 2010, 13:35

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
>  =A0
If you don't specify the absolute location it can be find in "DATADIR/Datab=
aseName/". And after you located the file you have a multitude of choice ho=
w to transfer the file. scp,ftp,http,mail all depending on what's installed=
on the server and what access you got to it.



-- MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:=A0 =A0 http://lists.mysql.com/mysql?unsub=3Dishaqgbo@yahoo.=
co.uk

=0A
--0-478969647-1262699144=:10702--

Re: Exporting the result of a Query into excel

am 05.01.2010 14:50:37 von sureshkumarilu

T2suIEluIHdpbmRvd3MsIFVzZSB3aW5zY3AgdG9vbCwgY29ubmVjdCB0byB0 aGUgc2VydmVyIGFu
ZCBjb3B5IHRoZSBmaWxlIHRvIGxvY2FsIG1hY2hpbmUgYW5kIGltcG9ydCBp dCBpbiBleGNlbC4N
ClRoYW5rcw0KU3VyZXNoIEt1bmENClNlbnQgZnJvbSBCbGFja0JlcnJ5riBv biBBaXJ0ZWwNCg0K
LS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCkZyb206IGlzaGFxIGdib2xh IDxpc2hhcWdib0B5
YWhvby5jby51az4NCkRhdGU6IFR1ZSwgNSBKYW4gMjAxMCAxMzo0MjoyMCAN ClRvOiA8bXlzcWxA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UgaG93 IHRvIHRyYW5zZmVy
IHRoZSBmaWxlLiBzY3AsZnRwLGh0dHAsbWFpbCBhbGwgZGVwZW5kaW5nIG9u IHdoYXQncyBpbnN0
YWxsZWQgb24gdGhlIHNlcnZlciBhbmQgd2hhdCBhY2Nlc3MgeW91IGdvdCB0 byBpdC4NCg0KDQoN
Ci0tIE15U1FMIEdlbmVyYWwgTWFpbGluZyBMaXN0DQpGb3IgbGlzdCBhcmNo aXZlczogaHR0cDov
L2xpc3RzLm15c3FsLmNvbS9teXNxbA0KVG8gdW5zdWJzY3JpYmU6oCCgIGh0 dHA6Ly9saXN0cy5t
eXNxbC5jb20vbXlzcWw/dW5zdWI9aXNoYXFnYm9AeWFob28uY28udWsNCg0K CgoKDQo=

Re: Exporting the result of a Query into excel

am 05.01.2010 17:27:45 von Jim Lyons

--0016e6da7ae36970c8047c6d5196
Content-Type: text/plain; charset=ISO-8859-1

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 have a directory *** that mysql can write to ***:

mysqldump --tab="/home/mysql/temp" mydb mytab

This will create 2 files in /home/mysql/temp: mytab.txt and mytab.sql. The
one you'll want is in mytab.txt.

Then use what transfer tool you have, ftp, scp, winscp, rsync to transfer
the file to another server.

On Tue, Jan 5, 2010 at 7:31 AM, 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
>
> --- On Tue, 5/1/10, Jay Ess wrote:
>
> From: Jay Ess
> Subject: Re: Exporting the result of a Query into excel
> To: "mysql@lists.mysql.com >> Mysql"
> Date: Tuesday, 5 January, 2010, 13:22
>
> 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.
> http://code.anjanesh.net/2007/12/export-mysql-data-to-excel- compatible.html
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/mysql?unsub=ishaqgbo@yahoo.co.uk
>
>
>
>
>




--
Jim Lyons
Web developer / Database administrator
http://www.weblyons.com

--0016e6da7ae36970c8047c6d5196--

Re: Exporting the result of a Query into excel

am 05.01.2010 17:38:25 von 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 specialized one. Putting a
plain old client console on that same box does not hurt anything, not
even security unless you leave a text file full of passwords laying
around. Having that console on the same host as the application is
invaluable not only for data-dumping jobs like this one, but for all
kinds of trouble shooting in general.

- michael dykman

On Tue, Jan 5, 2010 at 8:42 AM, ishaq gbola wrote:
> 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, sureshkumarilu@gmail.com w=
rote:
>
> From: sureshkumarilu@gmail.com
> Subject: Re: Exporting the result of a Query into excel
> To: "ishaq gbola" , mysql@lists.mysql.com
> Date: Tuesday, 5 January, 2010, 13:37
>
> 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=AE on Airtel
>
> -----Original Message-----
> From: ishaq gbola
> Date: Tue, 5 Jan 2010 13:31:59
> To:
> Subject: Re: Exporting the result of a Query into excel
>
> 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 wrote:
>
> From: Jay Ess
> Subject: Re: Exporting the result of a Query into excel
> To: "mysql@lists.mysql.com >> Mysql"
> Date: Tuesday, 5 January, 2010, 13:22
>
> 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.
> http://code.anjanesh.net/2007/12/export-mysql-data-to-excel- compatible.ht=
ml
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
>
> To unsubscribe:=A0 =A0 http://lists.mysql.com/mysql?unsub=3Dishaqgbo@yaho=
o.co.uk
>
>
>
>
>
>
>
>
>
>



--=20
- michael dykman
- mdykman@gmail.com

May the Source be with you.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg

Re: Exporting the result of a Query into excel

am 05.01.2010 20:50:00 von 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 is necessary to remove all the formatting stuff that you normally
> have in the output of a select statement.
>
> An alternative, if you have a directory *** that mysql can write to ***:
>
> mysqldump --tab="/home/mysql/temp" mydb mytab
>
> This will create 2 files in /home/mysql/temp: mytab.txt and mytab.sql. The
> one you'll want is in mytab.txt.
>
> Then use what transfer tool you have, ftp, scp, winscp, rsync to transfer
> the file to another server.
>
> On Tue, Jan 5, 2010 at 7:31 AM, 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
>>
>> --- On Tue, 5/1/10, Jay Ess wrote:
>>
>> From: Jay Ess
>> Subject: Re: Exporting the result of a Query into excel
>> To: "mysql@lists.mysql.com >> Mysql"
>> Date: Tuesday, 5 January, 2010, 13:22
>>
>> 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.
>> http://code.anjanesh.net/2007/12/export-mysql-data-to-excel- compatible.html
>>
>> --
>> MySQL General Mailing List
>> For list archives: http://lists.mysql.com/mysql
>> To unsubscribe: http://lists.mysql.com/mysql?unsub=ishaqgbo@yahoo.co.uk
>>
>>
>>
>>
>>
>
>
>
>

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org

Re: Exporting the result of a Query into excel

am 05.01.2010 21:19:15 von 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 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 have a directory *** that mysql can write to ***:
>>
>> mysqldump --tab="/home/mysql/temp" mydb mytab
>>
>> This will create 2 files in /home/mysql/temp: mytab.txt and
>> mytab.sql. The
>> one you'll want is in mytab.txt.
>>
>> Then use what transfer tool you have, ftp, scp, winscp, rsync to
>> transfer
>> the file to another server.
>>
>> On Tue, Jan 5, 2010 at 7:31 AM, 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
>>>
>>> --- On Tue, 5/1/10, Jay Ess wrote:
>>>
>>> From: Jay Ess
>>> Subject: Re: Exporting the result of a Query into excel
>>> To: "mysql@lists.mysql.com >> Mysql"
>>> Date: Tuesday, 5 January, 2010, 13:22
>>>
>>> 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.
>>> http://code.anjanesh.net/2007/12/export-mysql-data-to-excel- compatible.html
>>>
>>>
>>> --
>>> MySQL General Mailing List
>>> For list archives: http://lists.mysql.com/mysql
>>> To unsubscribe:
>>> http://lists.mysql.com/mysql?unsub=ishaqgbo@yahoo.co.uk
>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>>
>



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org

Re: Exporting the result of a Query into excel

am 05.01.2010 21:25:02 von Jim Lyons

--0016e6d6444102eeef047c70a2c8
Content-Type: text/plain; charset=ISO-8859-1

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 authority on a given box to set up
an ODBC connection (which might involve downloading software). You would
also have to do it on every machine you want to load the data on. A
tab-delimited file can be transferred to any machine, even stored on a
flash-drive and walked somewhere.


On Tue, Jan 5, 2010 at 1:50 PM, 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 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 have a directory *** that mysql can write to ***:
>>
>> mysqldump --tab="/home/mysql/temp" mydb mytab
>>
>> This will create 2 files in /home/mysql/temp: mytab.txt and mytab.sql.
>> The
>> one you'll want is in mytab.txt.
>>
>> Then use what transfer tool you have, ftp, scp, winscp, rsync to transfer
>> the file to another server.
>>
>> On Tue, Jan 5, 2010 at 7:31 AM, 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
>>>
>>> --- On Tue, 5/1/10, Jay Ess wrote:
>>>
>>> From: Jay Ess
>>> Subject: Re: Exporting the result of a Query into excel
>>> To: "mysql@lists.mysql.com >> Mysql"
>>> Date: Tuesday, 5 January, 2010, 13:22
>>>
>>> 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.
>>>
>>> http://code.anjanesh.net/2007/12/export-mysql-data-to-excel- compatible.html
>>>
>>> --
>>> MySQL General Mailing List
>>> For list archives: http://lists.mysql.com/mysql
>>> To unsubscribe:
>>> http://lists.mysql.com/mysql?unsub=ishaqgbo@yahoo.co.uk
>>>
>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>>


--
Jim Lyons
Web developer / Database administrator
http://www.weblyons.com

--0016e6d6444102eeef047c70a2c8--

RE: Exporting the result of a Query into excel

am 06.01.2010 04:40:20 von Jason Trebilcock

> -----Original Message-----
> From: ishaq gbola [mailto:ishaqgbo@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
>=20
> Hi all,
>=20
> 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
>=20
>=20

If'n you can download and install Toad for MySQL, then the steps might =
go like this:
1. Write the query
2. Run the query
3. Click the "Export data to an Excel file" button/icon (if you have =
Excel 2007 installed, it might throw a warning at you) 4. Note where the =
file was created to.
5. ?
6. Profit!

The only caveat to the above is to be aware of how many rows you want to =
export and the corresponding column/row limitations of whatever version =
of Excel you have installed.

As an additional caveat, you could export to html or csv formats as well =
which would allow you to work around any size limitations imposed by =
Excel.

Jason
=20


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg