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 2008 Forums
 SSIS and Import/Export (2008)
 Data Format Issue

Author  Topic 

bcomeau1986
Starting Member

1 Post

Posted - 2012-12-18 : 22:39:42
Hi all,

I'm importing data in the following format:

1/1/2007 0:00:00;135;6006081;42.00;176400.00
1/1/2007 0:00:00;135;1113017;18.00;82800.00

My error is:

Msg 4864, Level 16, State 1, Line 1
Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 1, column 5 (dblS).

My fields are:

[dtDate] [datetime] NULL,
[intRestId] [int] NULL,
[intProdId] [int] NULL,
[dblQ] [numeric] (18,0) Null,
[dblS] [numeric] (18,0) Null,
[dblP] [numeric] (18,0) Null

My Terminators are:

FIELDTERMINATOR = ';',
ROWTERMINATOR = '\n'

Any insights?

Thanks,
Brian

sunitabeck
Master Smack Fu Yak Hacker

5155 Posts

Posted - 2012-12-19 : 09:45:33
You have six columns in your table, but only five in the data. Drop the last column (or change the data so there is a sixth column as shown below)
1/1/2007 0:00:00;135;6006081;42.00;176400.00;
1/1/2007 0:00:00;135;1113017;18.00;82800.00;
Go to Top of Page
   

- Advertisement -