List:General Discussion« Previous MessageNext Message »
From:Rory McKinley Date:October 21 2003 11:10am
Subject:Re: export to textfile
View as plain text  
Hi Bernd

If you are just interested in dumping the data in CSV (or whatever) format
you can do it like so:

SELECT *
INTO OUTFILE 'arb_file.csv' FIELDS TERMINATED BY ',' LINE TERMINATED BY '\n'
FROM  arb_table
WHERE arb_conditions

There are quite a few options available, so I suggest you check the MySQL
manual, to see them all.

HTH.
Rory McKinley
Nebula Solutions
+27 82 857 2391
rorym@stripped
"There are 10 kinds of people in this world,
those who understand binary and those who don't" (Unknown)
----- Original Message ----- 
From: "Bernd Tannenbaum" <tannenbaum@stripped>
To: <mysql@stripped>
Sent: Tuesday, October 21, 2003 12:42 PM
Subject: export to textfile


Hello all,

Have only a small problem with my mysql and hope that i can get a lil hint
from ya how to go on.
Currently i`m importing Log-files in the mysql-database with a cronjob
(bashscript in Linux). After some processing in the db itself i try now to
export the results into a textfile.
But i must be blind reading the mysql documentation cause i cannot find a
mysqlexport. Hmm, Mysqldump can be used to backup the db, thats not what i
need. Then i found "mysql -e" and it rly writes the chosen fields to a
textfile but i dont know how to get options to that (like
fileds-terminated-by=';' or stuff like that).

So did i miss something?
Is there a better way to go than "mysql -e"?
If not, where can i find a good explanation of the possible options of this,
every hint welcome.

Hope for a lil help,
Bernd




-- 

One OS to rule them all, one OS to find them.
One OS to bring them all, and in the darkness bind them
In the land of Redmond, where the shadows lie.

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



Thread
export to textfileBernd Tannenbaum21 Oct
  • Re: export to textfileRory McKinley21 Oct
    • Re: export to textfileBernd Tannenbaum21 Oct
  • Re: export to textfileVictoria Reznichenko21 Oct
  • Re: export to textfileRory McKinley21 Oct
    • Re: export to textfile -solved :)Bernd Tannenbaum21 Oct
      • Moving to Linux and NetAppsBarry Cornelius21 Oct
Re: export to textfileAlec.Cawley21 Oct