Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 SQL Server 2012 Forums
 Transact-SQL (2012)
 Bulk Insert and FieldTerminator Problem
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Yak Posting Veteran

76 Posts

Posted - 05/02/2013 :  14:13:21  Show Profile  Reply with Quote
Good afternoon,

I am using a bulk insert to bring the contenets of a csv file into a temp table. The insert works but I found a new problem, some of the fields have a ',' in the middle of the field.

My field terminator is ','

"Joseph Abcde","Partner","","PasswordNotRequired, NormalAccount"

"Joseph W. Wecfder, Jr.","Partner","","NormalAccount"

Notice the comma right after the last name and before the suffix on the 2nd record.

Anything I can do about that?

Bryan Holmstrom

Flowing Fount of Yak Knowledge

1054 Posts

Posted - 05/02/2013 :  14:45:43  Show Profile  Reply with Quote
I am not sure about the rule of terminator as if it should always be a single character or can be multiple. In case if terminator allows multiple characters and if every value in the file is enclosed with double qoutes "? then try terminator as to be --> ","

Else, I would suggest to regenerate the file (if possible) with a differnt terminator with a unique character (terminator) e.g. pipe |

Or, open the CSV with Excel file and save it as Excel format and then read that excel using openrowset etc queries

Or ....


Edited by - MIK_2008 on 05/02/2013 14:46:48
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000