I have data in the csv file similar to this:
Name,Age,Location,Score "Bob, B",34,Boston,0 "Mike, M",76,Miami,678 "Rachel, R",17,Richmond,"1,234"
While trying to BULK INSERT this data into a SQL Server table, I encountered two problems.
- If I use FIELDTERMINATOR=',' then it splits the first (and sometimes the last) column
- The last column is an integer column but it has quotes and comma thousand separator whenever the number is greater than 1000
Is there a way to import this data (using XML Format File or whatever) without manually parsing the csv file first?
I appreciate any help. Thanks.