![]() It only recognizes commas and newlines as any type of control character and there doesn't seem to be any additional lines you can add to fix it. I've also tried to manually write an SQL command such as: BULK INSERT CSVTest I haven't found any settings that could change this at all. So double-quotations in the start are all always ignored regardless how many they are. I also used another application to validate the file as CSV, where 2nd and 3rd records pass.īy using the SSMS Import Wizard I get: _Value_1_,_Notes_Ĩ-pooln"" grupp 7:6 To11:13,With escaped quotesĨ-pooln"""""""""""""""" grupp 7:6 To11:13,With loads of quotes The last one just contains a lot of them for testing. According to some site you need to escape double-quotes within a field by adding another double-quote, that's what you see at record 2. So the first record is how I got it from that program. I used a 3rd-party program extract the data to CSV. Here's the test CSV file I'm using: "Value 1","Notes" The files contain free text strings where they use both double-quotations and commas within the fields. I've come to understand that when it comes to CSV there are slightly different standards, but SSMS doesn't seem to be able to import either and I feel like there really should be a convenient way. ![]() There's about a million questions and topics about it online, but none really works. I'm trying to import a CSV file, which includes commas and quotes in the fields, into a SQL Server database.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |