Here is my code.
TRUNCATE TABLE dsw_data.inventory_sss2;
SET AUTOCOMMIT=0;
LOAD DATA INFILE 'c:/inetpub/wwwroot/Data/inventory_sss.csv' INTO TABLE dsw_data.inventory_sss2 FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\r';
COMMIT;
Here is the resulting error
Error Code: 1366. Incorrect integer value: 'CUST NO' for column 'sno' at row 1"
I want the first row of the CSV to be the table headers, and the other rows to be the data.
Also how do I specify which rows should be numeric (If this is even needed, I'm not sure).
I have searched here and google, but haven't seen code samples to set the headers like I want.