I'm importing a CSV into a MySQL table with LOAD DATA INFILE. One of the table's fields stores zip code data, which I've defined in the table structure contributor_zipcode INT.
In the CSV, this field is sometimes empty. When I execute the LOAD query, MySQL will throw a warning like:
Incorrect integer value: '' for column 'contributor_zipcode' at row 180
I've tried redefining the field as contributor_zipcode INT DEFAULT '0', which creates the same warning, and contributor_zipcode INT DEFAULT NULL, which MySQL won't allow. Any advice?
2004,urn:fec:transaction,indiv:2004:1902928,15,24020610238,f,1000.00,2004-06-15,"FELDSTEIN, MARTIN",h30013132661,I,HARVARD UNIVERSITY,,M,,BELMONT,MA,02478,H5100,Harvard University,,,,Lisa Murkowski (R),N00026050,R,P,AK,AK,,Lisa Murkowski - US Senate,C00384529,R,f,,,federal:senate,federal:senate,I,W