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 5, 2013 1:01 PM
SSC-Enthusiastic

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

Group: General Forum Members
Last Login: Wednesday, June 18, 2014 3:04 PM
Points: 162, Visits: 570
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 6, 2013 12:41 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 8:51 PM
Points: 7,125, Visits: 12,723
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
Post #1427214
Posted Wednesday, March 6, 2013 12:46 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 8:51 PM
Points: 7,125, Visits: 12,723
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
Post #1427215
Posted Wednesday, March 6, 2013 7:29 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 12:25 PM
Points: 5,174, Visits: 12,028
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 6, 2013 7:52 AM
SSC-Enthusiastic

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

Group: General Forum Members
Last Login: Wednesday, June 18, 2014 3:04 PM
Points: 162, Visits: 570
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 6, 2013 8:00 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 12:25 PM
Points: 5,174, Visits: 12,028
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 6, 2013 9:54 AM
SSC-Enthusiastic

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

Group: General Forum Members
Last Login: Wednesday, June 18, 2014 3:04 PM
Points: 162, Visits: 570
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 6, 2013 12:22 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 8:51 PM
Points: 7,125, Visits: 12,723
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
Post #1427579
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse