INTO OUTFILE command

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
bouncer
Forum Contributor
Posts: 162
Joined: Wed Feb 28, 2007 10:31 am

INTO OUTFILE command

Post 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
bouncer
Forum Contributor
Posts: 162
Joined: Wed Feb 28, 2007 10:31 am

Re: INTO OUTFILE command

Post by bouncer »

anyone can help me ?

thanks in advance
Post Reply