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 Administration (2000)
 Batch insertion2

Author  Topic 

Trumb1mj
Starting Member

5 Posts

Posted - 2006-06-27 : 09:31:04
I have tried using the 'BULK INSERT' command and have some across a problem. First of all here is my text file:

1,1,1,86979,,C,,C,199,1,ZZZ,,2006-09-27 00:00:00.000,,cme

and here is my code:

BULK INSERT rtd_instruments from 'C:\LoadableData.txt' With (FIELDTERMINATOR = ',')


and here is my error:

Server: Msg 4864, Level 16, State 1, Line 1
Bulk insert data conversion error (type mismatch) for row 1, column 1 (ID).


Any ideas why I am getting this error????

Trumb1mj
Starting Member

5 Posts

Posted - 2006-06-27 : 10:33:24
Found my error! Needed to have a ROWTERMINATOR so now the code looks like this just in case anyone ever has this problem:


BULK INSERT CTCMaster..rtd_instruments
FROM 'C:\LoadableData.txt'
WITH (FIELDTERMINATOR = '|',ROWTERMINATOR = ':')

and my import file has a ':' at the end of each row.
Go to Top of Page
   

- Advertisement -