Hi,

I need to extract some data to a textfile from a big database.


If I try to do like this:
mysql < queryfile.sql > outfile.txt

"outfile.txt" it looks something like:
"OrderID", "Quant", "OrdrDate", "code1", "code2"...
10021, 12, 20060412, 23, 95...
10022, 5, 20060412, , 75...

But, I never get a complete file. I get a out of memory error after a hour or 2!!


If I instead insert the following code in queryfile.sql:
"INTO OUTFILE 'outfile.txt'"

Now my outfile.txt don't get the first row with the column names, and any NULL values are exported as "\N".

This is a big problem, cause the import function that exist where I send the data only accept the format I get using "mysql < queryfile.sql > outfile.txt".

Any help??! Ideas??

Can I in any way format my output to print the column names and print NULL values as 'nothing'??

Regards,
/Johan Lundqvist

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to