Re: How can we stock the query result into a text file

2009-06-26 Thread Moon's Father
Login mysql client. Do the following commands.
tee ie.txt;
...
notee;

On Thu, Jun 25, 2009 at 10:29 PM, John Daisley 
john.dais...@mypostoffice.co.uk wrote:

 SELECT INTO OUTFILE does almost the same thing as spool in SQL*Plus

 SELECT columnname from tablename into outfile '/path/and/filename.txt'

 Regards

 John


  Hi
 
  In mysql , how can we stock the query result into a text file
 
  the table is too large , i don't want to dump it , but select a part of
  it,
  i wrote a script perl to do this, but each time i have to change the
  parameters in the script to get another table, when i google it, i find
  the
  function in Oracle
 
  
  spool 'filenameandpath.txt'
 
  select ...
  from ..
  /
 
  spool off
  
  does Mysql has such function?
 
 
 
 
  --
  -
  Lin Chun
 
 
  __
  This email has been scanned by Netintelligence
  http://www.netintelligence.com/email
 



 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
 http://lists.mysql.com/mysql?unsub=yueliangdao0...@gmail.com




-- 
David Yeung,
MySQL Senior Support Engineer,
Sun Gold Partner.
My Blog:http://yueliangdao0608.cublog.cn


Re: How can we stock the query result into a text file

2009-06-26 Thread Johan De Meersman
Have a look at create table as select and the csv engine.

On Thu, Jun 25, 2009 at 4:18 PM, Lin Chun franks1...@gmail.com wrote:

 Hi

 In mysql , how can we stock the query result into a text file

 the table is too large , i don't want to dump it , but select a part of it,
 i wrote a script perl to do this, but each time i have to change the
 parameters in the script to get another table, when i google it, i find the
 function in Oracle

 
 spool 'filenameandpath.txt'

 select ...
 from ..
 /

 spool off
 
 does Mysql has such function?




 --
 -
 Lin Chun




-- 
Celsius is based on water temperature.
Fahrenheit is based on alcohol temperature.
Ergo, Fahrenheit is better than Celsius. QED.


RE: How can we stock the query result into a text file

2009-06-26 Thread Jerry Schwartz


-Original Message-
From: Moon's Father [mailto:yueliangdao0...@gmail.com]
Sent: Friday, June 26, 2009 4:13 AM
To: john.dais...@butterflysystems.co.uk
Cc: Lin Chun; mysql@lists.mysql.com
Subject: Re: How can we stock the query result into a text file

Login mysql client. Do the following commands.
tee ie.txt;
...
notee;

[JS] A more useful way is to redirect the output of the MySQL CLI into a
file. That will give you a tab-delimited file:

mysql   query.sql  queryoutput.txt

Regards,
 
Jerry Schwartz
The Infoshop by Global Information Incorporated
195 Farmington Ave.
Farmington, CT 06032
 
860.674.8796 / FAX: 860.674.8341
 
www.the-infoshop.com




On Thu, Jun 25, 2009 at 10:29 PM, John Daisley 
john.dais...@mypostoffice.co.uk wrote:

 SELECT INTO OUTFILE does almost the same thing as spool in SQL*Plus

 SELECT columnname from tablename into outfile '/path/and/filename.txt'

 Regards

 John


  Hi
 
  In mysql , how can we stock the query result into a text file
 
  the table is too large , i don't want to dump it , but select a part
of
  it,
  i wrote a script perl to do this, but each time i have to change the
  parameters in the script to get another table, when i google it, i
find
  the
  function in Oracle
 
  
  spool 'filenameandpath.txt'
 
  select ...
  from ..
  /
 
  spool off
  
  does Mysql has such function?
 
 
 
 
  --
  -
  Lin Chun
 
 
  __
  This email has been scanned by Netintelligence
  http://www.netintelligence.com/email
 



 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
 http://lists.mysql.com/mysql?unsub=yueliangdao0...@gmail.com




--
David Yeung,
MySQL Senior Support Engineer,
Sun Gold Partner.
My Blog:http://yueliangdao0608.cublog.cn




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



How can we stock the query result into a text file

2009-06-25 Thread Lin Chun
Hi

In mysql , how can we stock the query result into a text file

the table is too large , i don't want to dump it , but select a part of it,
i wrote a script perl to do this, but each time i have to change the
parameters in the script to get another table, when i google it, i find the
function in Oracle


spool 'filenameandpath.txt'

select ...
from ..
/

spool off

does Mysql has such function?




-- 
-
Lin Chun


Re: How can we stock the query result into a text file

2009-06-25 Thread John Daisley
SELECT INTO OUTFILE does almost the same thing as spool in SQL*Plus

SELECT columnname from tablename into outfile '/path/and/filename.txt'

Regards

John


 Hi

 In mysql , how can we stock the query result into a text file

 the table is too large , i don't want to dump it , but select a part of
 it,
 i wrote a script perl to do this, but each time i have to change the
 parameters in the script to get another table, when i google it, i find
 the
 function in Oracle

 
 spool 'filenameandpath.txt'

 select ...
 from ..
 /

 spool off
 
 does Mysql has such function?




 --
 -
 Lin Chun


 __
 This email has been scanned by Netintelligence
 http://www.netintelligence.com/email




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org