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 format:

name VARCHAR(30)
email VARCHAR(30)
a1 TINYINT
a2 TINYINT

When I typed the following:

load data local infile 'grades.txt' into table grades
  fields terminated by '\t';

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?

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to