0

I'm trying to load CSV file with BULK INSERT command. But it fails if FIELDTERMINATOR is a part of text, for instance:

678,"Value with , inside",199

Is there a way to make BULK INSERT work with this kind of data?

dragonfly
  • 17,407
  • 30
  • 110
  • 219
  • get a pipe-delimited file. – M.Ali Aug 17 '15 at 13:23
  • possible duplicate of [SQL Server Bulk insert of CSV file with inconsistent quotes](http://stackoverflow.com/questions/782353/sql-server-bulk-insert-of-csv-file-with-inconsistent-quotes) – James Z Aug 17 '15 at 13:37
  • If all your rows have quotes like that, you could probably have a suitable separator, but I guess you have the same problem as that question – James Z Aug 17 '15 at 13:38
  • If it's not too large of a file, you could open the csv with Excel, save it as an xls/xlsx file, then import it via OPENROWSET. This won't be too helpful if you need to repeat the process for automation, though. – Dave Mason Aug 17 '15 at 15:01

0 Answers0