February 15, 2017 at 6:08 am
Hello,
I am working on one SSIS package, which convert CSV file to SQL table. But somehow, while i am executing package, i am getting below error. I have tried changing the data type of Patient Number with Float DT_R4, DT_R8, Numeric and String. But it's not working.
In Destination table Patient Number has data type float Length-8 Precision-53.
[Flat File Source [57]] Error: Data conversion failed. The data conversion for column "Patient Number" returned status value 2 and status text "The value could not be converted because of a potential loss of data.".
February 15, 2017 at 6:58 am
EasyBoy - Wednesday, February 15, 2017 6:08 AMHello,I am working on one SSIS package, which convert CSV file to SQL table. But somehow, while i am executing package, i am getting below error. I have tried changing the data type of Patient Number with Float DT_R4, DT_R8, Numeric and String. But it's not working.
In Destination table Patient Number has data type float Length-8 Precision-53.[Flat File Source [57]] Error: Data conversion failed. The data conversion for column "Patient Number" returned status value 2 and status text "The value could not be converted because of a potential loss of data.".
That particular error does get annoying. I suggest that you try adding a redirect on truncate so that you can identify exactly which rows are causing the error and take it from there.
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
February 15, 2017 at 9:59 pm
This was removed by the editor as SPAM
February 16, 2017 at 12:37 pm
JasonClark - Wednesday, February 15, 2017 9:59 PMMostly this error occur when data types between source and destination does not match. There might be several other reason. Have a look here: https://blog.sqlauthority.com/2012/12/30/sql-server-fix-error-the-conversion-returned-status-value-2-and-status-text-the-value-could-not-be-converted-because-of-a-potential-loss-of-data-sql-server-import-and-export-wizard/
try bulk insert it will give you more accurate error then bcp or SSIS..
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply