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

The conversion returned status value 2 and status text "The value could not be converted because of a potential loss of data.". Expand / Collapse
Author
Message
Posted Tuesday, March 05, 2013 1:01 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, March 20, 2014 1:36 PM
Points: 162, Visits: 562
I have a csv file (FIXED Width) with one cloumn and I read that column as string data type and then covert to Numeric (10,0) using Data Conversion Task.

But I get this error when I run the pacakge:
The conversion returned status value 2 and status text "The value could not be converted because of a potential loss of data.".

I tried to redirect the error Rows and found out that, when every the column has "0" as a value its redirecting it. I am not able to understand why is it, not able to read 0 as numeric(10,0). Where it is able to load other values except "0" ( I have seen even -1, -1234 doesnt have any problem)

I enabled "Retain null values from the source as null values in the data flow" on the Flat file Source editor.

Anyone out there had experienced this? SSIS is wired.....
Post #1427013
Posted Wednesday, March 06, 2013 12:41 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Wednesday, April 16, 2014 9:25 AM
Points: 7,070, Visits: 12,523
quillis131 (3/5/2013)
I have a csv file (FIXED Width)

Files are either delimited, e.g. a CSV file, or fixed width. Which is it that you are dealing with?


__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community. --Plato

Believe you can and you're halfway there. --Theodore Roosevelt

Everything Should Be Made as Simple as Possible, But Not Simpler --Albert Einstein

The significant problems we face cannot be solved at the same level of thinking we were at when we created them. --Albert Einstein

1 apple is not exactly 1/8 of 8 apples. Because there are no absolutely identical apples. --Giordy
Post #1427214
Posted Wednesday, March 06, 2013 12:46 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Wednesday, April 16, 2014 9:25 AM
Points: 7,070, Visits: 12,523
weird forum error - this post was meant for a different thread - post removed

__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community. --Plato

Believe you can and you're halfway there. --Theodore Roosevelt

Everything Should Be Made as Simple as Possible, But Not Simpler --Albert Einstein

The significant problems we face cannot be solved at the same level of thinking we were at when we created them. --Albert Einstein

1 apple is not exactly 1/8 of 8 apples. Because there are no absolutely identical apples. --Giordy
Post #1427215
Posted Wednesday, March 06, 2013 7:29 AM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Yesterday @ 8:23 PM
Points: 4,832, Visits: 11,197
opc.three (3/6/2013)
quillis131 (3/5/2013)
I have a csv file (FIXED Width)

Files are either delimited, e.g. a CSV file, or fixed width. Which is it that you are dealing with?


What got my attention was that I initially read it as

".. a csv file (FIXED Width) with one clown ... "




Help us to help you. For better, quicker and more-focused answers to your questions, consider following the advice in this link.

When you ask a question (and please do ask a question: "My T-SQL does not work" just doesn't cut it), please provide enough information for us to understand its context.
Post #1427394
Posted Wednesday, March 06, 2013 7:52 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, March 20, 2014 1:36 PM
Points: 162, Visits: 562
Phil Parkin (3/6/2013)
opc.three (3/6/2013)
quillis131 (3/5/2013)
I have a csv file (FIXED Width)

Files are either delimited, e.g. a CSV file, or fixed width. Which is it that you are dealing with?


What got my attention was that I initially read it as

".. a csv file (FIXED Width) with one clown ... "




Its is CSV file with one Column as Fixed width
Post #1427420
Posted Wednesday, March 06, 2013 8:00 AM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Yesterday @ 8:23 PM
Points: 4,832, Visits: 11,197
quillis131 (3/6/2013)
Phil Parkin (3/6/2013)
opc.three (3/6/2013)
quillis131 (3/5/2013)
I have a csv file (FIXED Width)

Files are either delimited, e.g. a CSV file, or fixed width. Which is it that you are dealing with?


What got my attention was that I initially read it as

".. a csv file (FIXED Width) with one clown ... "




Its is CSV file with one Column as Fixed width


No it isn't. It is either CSV or Fixed Width, not both.



Help us to help you. For better, quicker and more-focused answers to your questions, consider following the advice in this link.

When you ask a question (and please do ask a question: "My T-SQL does not work" just doesn't cut it), please provide enough information for us to understand its context.
Post #1427430
Posted Wednesday, March 06, 2013 9:54 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, March 20, 2014 1:36 PM
Points: 162, Visits: 562
Phil Parkin (3/6/2013)
quillis131 (3/6/2013)
Phil Parkin (3/6/2013)
opc.three (3/6/2013)
quillis131 (3/5/2013)
I have a csv file (FIXED Width)

Files are either delimited, e.g. a CSV file, or fixed width. Which is it that you are dealing with?


What got my attention was that I initially read it as

".. a csv file (FIXED Width) with one clown ... "




Its is CSV file with one Column as Fixed width


No it isn't. It is either CSV or Fixed Width, not both.



Its a Fixed Width File
Post #1427509
Posted Wednesday, March 06, 2013 12:22 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Wednesday, April 16, 2014 9:25 AM
Points: 7,070, Visits: 12,523
Chances are you have your Flat File Connection Manager setup incorrectly. When you go to Preview, does your data line up? If not, make sure you are accounting for the End Of Line characters in your column-definitions.

If you're stuck zip your SSIS Package and a few lines of your data file to this thread and I'll have a look.


__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community. --Plato

Believe you can and you're halfway there. --Theodore Roosevelt

Everything Should Be Made as Simple as Possible, But Not Simpler --Albert Einstein

The significant problems we face cannot be solved at the same level of thinking we were at when we created them. --Albert Einstein

1 apple is not exactly 1/8 of 8 apples. Because there are no absolutely identical apples. --Giordy
Post #1427579
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse