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)
 First Row problem with Bulk Insert

Author  Topic 

drman
Starting Member

38 Posts

Posted - 2002-05-07 : 11:29:40
I have done some experimenting with Bulk Insert, but the following
is one issue I have not figured out. Below is the file to be imported.
I wish to start on Row 3. I am loading this into a temp table that exactly matches the structure of the import file.

002057
DIST
"000001","Test.Server.Full.G001","NJ","","03/20/2002","04/20/2002"
"000002","Test2.Server.Wkly.G001","NJ","","03/20/2002","05/20/2002"

My Bulk Insert command is as follows:

BULK INSERT tmpImportTable FROM 'c:\t0105.dist'
WITH ( FIELDTERMINATOR = '"",""', FirstRow = 3)

I can get the 4th row correctly, but the 3rd row comes out as follows
002057
Test.Server.Full.G001
NJ
NULL
03/20/2002
04/20/2002

I tried using RowTerminator = '\n' , but it did not make a difference.

Any help would be greatly appreciated.

DRMAN

   

- Advertisement -