I'm using the following to load a csv file to a mysql database:
LOAD DATA LOCAL INFILE 'file_location.csv'
INTO TABLE social_spend
FIELDS TERMINATED BY ','
OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY '\r\n'
IGNORE 1 ROWS
I have a text field that is written as: 'D,i,Y', which, after being uploaded shows in my database as the same:'D,i,Y'
I have a numeric field that is written as: '1,234' that is automatically trunacted on upload to: '1'
Why are text field commas preserved, but numeric fields are not?