Friday, February 24, 2012

Bulk Insert

Hi,

I am trying to do the data transfer using BULK INSERT from a dat file. And the data is only one row .
The bulk insert is giving me the error
"Bulk insert data conversion error (truncation) for row 1, column 11 (extension1)"
The line given below is that data as it appear in the dat file.

'20030715','Logiciel','Taching, Inc.','108 Pierson Ave',,'Edison','NJ','08837','USA','732-603-7877',,,,,,,,,,,,,,,,,,,,'N','N','N','N','N','N',, ,2003/jul/15 11:09:33.718000,,,,

And that column 11(name of that column is extension1) has no data and the datatype in SQL server for that column is varchar(1).

I am not able to figure out why this error. Can anyone help.
:mad:
RegardsShow us the BULK INSERT statement you're running...

Edison huh....|||Hi,
The below is the bulk insert statement I am using.
BULK INSERT vendor FROM 'c:\reload\182.dat'
WITH (

FIELDTERMINATOR = ',',
ROWTERMINATOR = '\n'
)|||for kicks...dts it in to a staging table...let dts create it, and see what it does...|||Did you create the source file yourself or it's a result of some other system uptputting it? I imported it using DTS, but the single quotes are messing me up when using BCP. Of course I can do an update after it, but that's a workaround. Any chance you can use a pipe for field delimiter (comma is very common for a field value) and loose the single quotes?|||Thanks,
will try and see

No comments:

Post a Comment