I'm using SQL Server Bulk Insert to import a .csv file but my .csv has double quotation marks enclosing text fields. Is it possible to remove the quote marks whilst importing the data?
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about CollectivesStack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
Explore Stack InternalI'm using SQL Server Bulk Insert to import a .csv file but my .csv has double quotation marks enclosing text fields. Is it possible to remove the quote marks whilst importing the data?
FIELDTERMINATOR ='","'is what you are looking for I think. However, you will be left with the first and last column having a quote in it. You can fix this withREPLACE()function after you bring the data into aTEMP TABLEprior to inserting it into yourDB Tableor use aFORMAT FILEwith yourBULK INSERTto avoid this all together. They can be annoying though.