Page 1 of 1

INTO OUTFILE command

Posted: Fri May 23, 2008 11:23 am
by bouncer
hi there.

i'm having some trouble using the INTO OUTFILE command, when i run this query

[sql] SELECT * FROM `content` WHERE `date`='$today' INTO OUTFILE 'C:/temp/exem.csv'        FIELDS TERMINATED BY ';'         ENCLOSED BY ''        LINES TERMINATED BY '\n'; [/sql]

the exem.csv is created but when i open it, i have '\N' where i have null fields in content table, how can i remove the '\N' ?

little example

Code: Select all

 
e-000038109;e-000038109;2007-10-12;eOpo;0;1;Domingos Loureiro;190000007;1987-10-03;a1 a2 LX;Lx;1950;440;M;S;Domingos Loureiro;217735002;a1 a2 LX;Lx;1950;440;961323685;domingos-p-loureiro@test.com;M;2;2008-05-21;\N;\N;2008-05-22;355353011023706;967499978;something here;6934933000612;I536267;36267
 
if you notice i have some '\N', that field in content table (mySQL), is empty (null value).

thanks in advance

Re: INTO OUTFILE command

Posted: Wed May 28, 2008 9:50 am
by bouncer
anyone can help me ?

thanks in advance