On 8 Feb 2003, at 12:25, Bhavin Vyas wrote: > So, it could either be ....^www.yahoo.com^(ct value) or > .....^^.....(no ct value). I would like that when there is no > ct value present in the line, the ct value in Log table should > stay as the default NULL....but it is not. The value becomes '' > i.e. a zero length string.
If you want to insert a NULL, you have to use the representation of NULL that LOAD DATA expects, which is '\N' (a backslash followed by a capital N). So either preprocess your text files to put the '\N' in (or create them that way in the first place), or follow your import immediately with a query like: UPDATE Log SET ct = NULL WHERE ct = ''; Also, if you're not distinguishing between NULL and '' anyway, you may want to avoid using NULL at all. It seems to be increasing the complication for no benefit. -- Keith C. Ivey <[EMAIL PROTECTED]> Tobacco Documents Online http://tobaccodocuments.org Phone 202-667-6653 --------------------------------------------------------------------- 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