>-Original Message-
>From: Michael Dykman [mailto:mdyk...@gmail.com]
>Sent: Sunday, January 09, 2011 3:02 PM
>To: LAMP; mysql@lists.mysql.com
>Subject: Re: export result from select statement
>
>I second Jerry's recommendation. It always works like a charm for
>-Original Message-
>From: LAMP [mailto:l...@afan.net]
>Sent: Sunday, January 09, 2011 9:46 PM
>To: mysql@lists.mysql.com
>Subject: Re: export result from select statement
>
>maybe it's "clear" to other but it's pretty unclear.
>#mysql -userna
#mysql -username -p -e "select * from table_name where id=123" >
'/home/me/test/test.txt'
On Mon, Jan 10, 2011 at 8:15 AM, LAMP wrote:
> maybe it's "clear" to other but it's pretty unclear.
> #mysql -username -p "select * from table_name where id=123" >
> '/home/me/test/test.txt'
> actually do
maybe it's "clear" to other but it's pretty unclear.
#mysql -username -p "select * from table_name where id=123" >
'/home/me/test/test.txt'
actually doesn't work?!?
Jerry Schwartz wrote:
The technique I've settled on is this:
mysql blah blah blah < the_select_query.sql > the_output_i_want.t
Eric Bergen wrote:
select into outfile is the correct way. What do you mean by doesn't
work? Does it give you an error?
It was an issue with permissions :-)
Thanks
On Sat, Jan 8, 2011 at 3:04 PM, LAMP wrote:
Hi guys,
I wonder how to store to csv or txt file result from SELECT query? n
I second Jerry's recommendation. It always works like a charm for me.
- michael dykman
On Sun, Jan 9, 2011 at 2:44 PM, Jerry Schwartz wrote:
> The technique I've settled on is this:
>
> mysql blah blah blah < the_select_query.sql > the_output_i_want.txt
>
> That gives you a tab-delimited text
The technique I've settled on is this:
mysql blah blah blah < the_select_query.sql > the_output_i_want.txt
That gives you a tab-delimited text file with column headings.
Regards,
Jerry Schwartz
Global Information Incorporated
195 Farmington Ave.
Farmington, CT 06032
860.674.8796 / FAX: 860.674
select into outfile is the correct way. What do you mean by doesn't
work? Does it give you an error?
On Sat, Jan 8, 2011 at 3:04 PM, LAMP wrote:
> Hi guys,
> I wonder how to store to csv or txt file result from SELECT query? not a
> whole table nor database. Just results from SELECT query.
> Usua