load data infile 'c:/bse/EQ020307.CSV' into table bse fields terminated by ',' lines terminated by '\n' ignore 1 lines (code,name,kind,type,open,high,low,close,last,prevclose,trades,qty,vol,corp) all the fields are varchar(45) even when i change the filename i get error 1261 which says row 2660 doesn`t contain data for all columns. on the last 2 lines of every csv i want to upload Thank you
Look at your files in a HEX editor to see what is going on. On Linux you can yous khexedit or od -c. Sorry, cannot help you much with Windows off the top of my head, I never use it.
load data infile 'c:/bse/EQ230306.CSV' into table bse2007 fields terminated by ',' ENCLOSED BY '' escaped by '' LINES TERMINATED BY '\r\n' ignore 1 lines (code,name,kind,type,open,high,low,close,last,prevclose,trades,qty,vol,misc) i used this command the last field misc may or may not contain data and is taken care by escaped by '' now i get an error 1261 on last lines any file i try of this sort i get an error
I think you'd be better off sanitizing your data first with a simple Perl script or some other way of your choice.