LOAD DATA INFILE sets blanks to 0 instead of NULL

2002-02-26 Thread Philip Mak
I made an Excel spreadsheet containing grades of students in my class, like this: (name) (email) (assignment 1 grade)(assignment 2 grade) For when a student did not submit an assignment, I just left the field blank. I'm trying to import the spreadsheet into a MySQL table of the following

Re: LOAD DATA INFILE sets blanks to 0 instead of NULL

2002-02-26 Thread Paul DuBois
At 12:43 -0500 2/26/02, Philip Mak wrote: I made an Excel spreadsheet containing grades of students in my class, like this: (name) (email) (assignment 1 grade)(assignment 2 grade) For when a student did not submit an assignment, I just left the field blank. I'm trying to import the

Re: LOAD DATA INFILE sets blanks to 0 instead of NULL

2002-02-26 Thread Philip Mak
On Tue, Feb 26, 2002 at 12:03:25PM -0600, Paul DuBois wrote: it set the integer columns to 0 if they were blank in the text file. How can I make it set those to NULL instead? You'll have to preprocess the file to convert empty fields to \N. Damn, that's what I thought. I guess I'll have to

Re: LOAD DATA INFILE sets blanks to 0 instead of NULL

2002-02-26 Thread Paul DuBois
At 13:08 -0500 2/26/02, Philip Mak wrote: On Tue, Feb 26, 2002 at 12:03:25PM -0600, Paul DuBois wrote: it set the integer columns to 0 if they were blank in the text file. How can I make it set those to NULL instead? You'll have to preprocess the file to convert empty fields to \N. Damn,