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.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 BCP/Bulk Insert problem.

Author  Topic 

dgaylor
Yak Posting Veteran

54 Posts

Posted - 2005-03-04 : 13:06:09
Is there any way to bcp/bulk insert a csv file that has a field that is sometimes empty. Sometimes there is a value within quotes like "216" and sometimes there is nothing. When I try to bcp I get an error. The following is a sample of the data. The 4th field is causing me the issue. Thanks.

"P","L","1","4","C","C","9","6"
"J","J","2",,"C","C","9","9"
"C","P","1","2","C","C","9",""
"S","B","5",,"C","C","9","6"
   

- Advertisement -