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
 SQL Server Development (2000)
 Text File, Bulk Insert

Author  Topic 

skillile
Posting Yak Master

208 Posts

Posted - 2002-12-05 : 23:31:13
I have a data row(s) like this:

"11036729 ","C","20020719","01","06","001","20021203"

I am trying to use Bulk Insert such as:

BULK INSERT DB.dbo.tblorders
FROM 'C:\o1-200212031600.csv'
WITH
(
FIELDTERMINATOR = '","',
FIRSTROW = 1
)

That first " is messing up my insert is there a way to work around this.

Thanks

slow down to move faster...

ValterBorges
Master Smack Fu Yak Hacker

1429 Posts

Posted - 2002-12-06 : 06:37:38
You'll need to use a format file.

Here is a discussion
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=%23bTuEPRNAHA.225%40cppssbbsa02.microsoft.com&rnum=2&prev=/groups%3Fq%3Dbulk%2Binsert%2Band%2Bcomma%26hl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26selm%3D%2523bTuEPRNAHA.225%2540cppssbbsa02.microsoft.com%26rnum%3D2

Go to Top of Page
   

- Advertisement -