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
 General SQL Server Forums
 New to SQL Server Programming
 BULK INSERT Error

Author  Topic 

SQL_ACTUARY
Starting Member

7 Posts

Posted - 2007-01-09 : 10:18:31
Hello SQLTEAM

I have a flat fix length file...

H315620060417
H315620060417

I have a format file

8.0
2
1 SQLCHAR 0 5 "" 4 MCO_Number SQL_Latin1_General_CP1_CI_AS
2 SQLCHAR 0 8 "\r" 5 Run_Date SQL_Latin1_General_CP1_CI_AS

I get the following BULK INSERT

"BULK INSERT data conversion error (truncation) for
row 1, column 1 (MCO_Number).

Columns in destination table are nvarchar (5) and nvarchar (8). I have tried using "\r\n" and "\n" as row terminators.

Any help appreciated.

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-01-09 : 10:36:31
Host file data length should be double. for nvarchar(5) it should be 10


KH

Go to Top of Page
   

- Advertisement -