Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

truncation error but data types are the same Expand / Collapse
Author
Message
Posted Tuesday, October 30, 2012 2:04 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, February 7, 2013 8:29 AM
Points: 7, Visits: 30
Afternoon all,

I have a flat file .csv format that I am importing.
It is 53 columns across and when it hits column 3 it tells me that it can't process it, and everything after that column is null.
The column is the header row for the file and is a nvarchar(50) as is everything else for standardization purposes.
My error is:
Data conversion failed. The data conversion for column "Column 3" returned status value 2 and status text "The value could not be converted because of a potential loss of data.".

There is no text qualifier in this file, but I tried " anyway - no difference.
I set the error output to ignore the failure, and that is how I know everything is null after column 3.
The data rows come in just fine, but I am importing multiple files into one processing table, with possibly different headers, which is why I need the header row included with the data.

Anyone have any idea what is wrong with this thing?

I have spent 6 hours on it, and I am no closer to figuring it out.
I have asked for a new sample file to see if my test import file is corrupted somehow, but I haven't received it yet.

Thanks for all your assistance!!

Aazzner
Post #1379012
Posted Wednesday, October 31, 2012 5:43 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, February 7, 2013 8:29 AM
Points: 7, Visits: 30
Found the error.
It was in the data connection. The original input configuration thought the column was a float, and when it converted it to a unicode (50) it thought it was truncating.
All good!

So if anyone else is having this issue, go check your advanced column settings in your Flat File Connection Manager Editor and make sure they match :)

Aazzner
Post #1379260
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse