Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


The conversion returned status value 2 and status text "The value could not be converted because of...


The conversion returned status value 2 and status text "The value could not be converted because of a potential loss of data.".

Author
Message
quillis131
quillis131
SSC-Enthusiastic
SSC-Enthusiastic (162 reputation)SSC-Enthusiastic (162 reputation)SSC-Enthusiastic (162 reputation)SSC-Enthusiastic (162 reputation)SSC-Enthusiastic (162 reputation)SSC-Enthusiastic (162 reputation)SSC-Enthusiastic (162 reputation)SSC-Enthusiastic (162 reputation)

Group: General Forum Members
Points: 162 Visits: 572
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.....
Orlando Colamatteo
Orlando Colamatteo
SSCrazy Eights
SSCrazy Eights (8.2K reputation)SSCrazy Eights (8.2K reputation)SSCrazy Eights (8.2K reputation)SSCrazy Eights (8.2K reputation)SSCrazy Eights (8.2K reputation)SSCrazy Eights (8.2K reputation)SSCrazy Eights (8.2K reputation)SSCrazy Eights (8.2K reputation)

Group: General Forum Members
Points: 8219 Visits: 14368
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
Orlando Colamatteo
Orlando Colamatteo
SSCrazy Eights
SSCrazy Eights (8.2K reputation)SSCrazy Eights (8.2K reputation)SSCrazy Eights (8.2K reputation)SSCrazy Eights (8.2K reputation)SSCrazy Eights (8.2K reputation)SSCrazy Eights (8.2K reputation)SSCrazy Eights (8.2K reputation)SSCrazy Eights (8.2K reputation)

Group: General Forum Members
Points: 8219 Visits: 14368
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
Phil Parkin
Phil Parkin
SSCrazy Eights
SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)

Group: General Forum Members
Points: 8300 Visits: 19447
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.

If the answer to your question can be found with a brief Google search, please perform the search yourself, rather than expecting one of the SSC members to do it for you.

Please surround any code or links you post with the appropriate IFCode formatting tags. It helps readability a lot.
quillis131
quillis131
SSC-Enthusiastic
SSC-Enthusiastic (162 reputation)SSC-Enthusiastic (162 reputation)SSC-Enthusiastic (162 reputation)SSC-Enthusiastic (162 reputation)SSC-Enthusiastic (162 reputation)SSC-Enthusiastic (162 reputation)SSC-Enthusiastic (162 reputation)SSC-Enthusiastic (162 reputation)

Group: General Forum Members
Points: 162 Visits: 572
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
Phil Parkin
Phil Parkin
SSCrazy Eights
SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)

Group: General Forum Members
Points: 8300 Visits: 19447
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.

If the answer to your question can be found with a brief Google search, please perform the search yourself, rather than expecting one of the SSC members to do it for you.

Please surround any code or links you post with the appropriate IFCode formatting tags. It helps readability a lot.
quillis131
quillis131
SSC-Enthusiastic
SSC-Enthusiastic (162 reputation)SSC-Enthusiastic (162 reputation)SSC-Enthusiastic (162 reputation)SSC-Enthusiastic (162 reputation)SSC-Enthusiastic (162 reputation)SSC-Enthusiastic (162 reputation)SSC-Enthusiastic (162 reputation)SSC-Enthusiastic (162 reputation)

Group: General Forum Members
Points: 162 Visits: 572
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
Orlando Colamatteo
Orlando Colamatteo
SSCrazy Eights
SSCrazy Eights (8.2K reputation)SSCrazy Eights (8.2K reputation)SSCrazy Eights (8.2K reputation)SSCrazy Eights (8.2K reputation)SSCrazy Eights (8.2K reputation)SSCrazy Eights (8.2K reputation)SSCrazy Eights (8.2K reputation)SSCrazy Eights (8.2K reputation)

Group: General Forum Members
Points: 8219 Visits: 14368
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
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search