1
領域中,我針對表 DATE_SENT DATESTR_TO_DATE在加載文件導致NULL值
這裏是CSV的部分和下面的導入查詢。爲什麼日期字段被設置爲NULL?
1,"1/21/2013","0",1
2,"2/27/2013","0",1
這是SQL
LOAD DATA LOCAL INFILE 'C:/Users/Me/CSV.csv'
INTO TABLE Collections
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY '\r\n'
(`id`, @DATE_STR, `col`, `sid`)
SET `date_sent` = STR_TO_DATE(@DATE_STR, '%m/%d/%Y')