Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Hi guys,I'm a newbie here. Nice to meet everyoneRecently, I was trying to import a CSV file to a database as a table.But I found out that in my CSV, it has something like this line:DASD870W,"5.1CH DVD SYSTEM,",,SAM1000,AIWA LTD,AIWA,1025,DVD Lifestyle System,BrownsNote the bold field, somehow my the SQL server(2005) does not understand that as a single column but putting that string to the next column. Does anyone knows how to fix this type of problem? I believe this is a common case one but I couldn't find a helpful source for this.Thnx in advance,
Kristen
Test
22859 Posts
Posted - 2010-11-15 : 11:48:13
Depends what you are importing the CSV file with. CSV specification means different things to different people!To me it means:
Col1,Col2,Col3Col1,"Col2 embedded,comma quote delimited",Col3Col1,"Col2 embedded "" quote and quote delimited",Col3
and to some people it may mean allowing comma-delimiters for trailing, blank, columns to be ommitted