SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


conversion error


conversion error

Author
Message
muralikrishna37
muralikrishna37
SSC-Enthusiastic
SSC-Enthusiastic (155 reputation)SSC-Enthusiastic (155 reputation)SSC-Enthusiastic (155 reputation)SSC-Enthusiastic (155 reputation)SSC-Enthusiastic (155 reputation)SSC-Enthusiastic (155 reputation)SSC-Enthusiastic (155 reputation)SSC-Enthusiastic (155 reputation)

Group: General Forum Members
Points: 155 Visits: 99
Hi Every Body

i am using ssis to import csv files into sql server with change data types.for that i taken one flat file source and transform the data using data conversion transformation and load the data into sql server.but it got the below error.


Note:in sql server destination i create one table.in that i taken int data type to Inintcode column.

InintCode(csv file) i want in destination(sql server)
--------- ------------------------
1.50E+11 150000000000
1.50E+11 150000000000
no data(empty) Null
6.00E+11 600000000000
6.00E+11 600000000000
1.42E+11 142000000000
1.42E+11 142000000000
no data(empty) Null
1.42E+11 142000000000
1.50E+11 150000000000


Error: 0xC02020C5 at Data Flow Task, Data Conversion [231]: Data conversion failed while converting column "Inintcode" (48) to column "Inintcode1" (581). The conversion returned status value 2 and status text "The value could not be converted because of a potential loss of data.".

Error: 0xC0209029 at Data Flow Task, Data Conversion [231]: The "output column "InintCode1" (581)" failed because error code 0xC020907F occurred, and the error row disposition on "output column "InintCode1" (581)" specifies failure on error. An error occurred on the specified object of the specified component.

Error: 0xC0047022 at Data Flow Task, DTS.Pipeline: The ProcessInput method on component "Data Conversion" (231) failed with error code 0xC0209029. The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running.

Error: 0xC0047021 at Data Flow Task, DTS.Pipeline: Thread "WorkThread0" has exited with error code 0xC0209029.

Thanks
murali
Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (114K reputation)SSC Guru (114K reputation)SSC Guru (114K reputation)SSC Guru (114K reputation)SSC Guru (114K reputation)SSC Guru (114K reputation)SSC Guru (114K reputation)SSC Guru (114K reputation)

Group: General Forum Members
Points: 114647 Visits: 41390
Heh... do you think that 150,000,000,000 is gonna fit in an INT in SQL Server? Wink

--Jeff Moden

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
muralikrishna37
muralikrishna37
SSC-Enthusiastic
SSC-Enthusiastic (155 reputation)SSC-Enthusiastic (155 reputation)SSC-Enthusiastic (155 reputation)SSC-Enthusiastic (155 reputation)SSC-Enthusiastic (155 reputation)SSC-Enthusiastic (155 reputation)SSC-Enthusiastic (155 reputation)SSC-Enthusiastic (155 reputation)

Group: General Forum Members
Points: 155 Visits: 99
Hi Jeff,

when i fit Int datatype it shows error.tell me which data type i have to fit here.
the problem is blank row(empty row).how to take the data into sql server with
null instead of blank row.

thanks
murali
Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (114K reputation)SSC Guru (114K reputation)SSC Guru (114K reputation)SSC Guru (114K reputation)SSC Guru (114K reputation)SSC Guru (114K reputation)SSC Guru (114K reputation)SSC Guru (114K reputation)

Group: General Forum Members
Points: 114647 Visits: 41390
muralikrishna37 (8/31/2008)
Hi Jeff,

when i fit Int datatype it shows error.tell me which data type i have to fit here.
the problem is blank row(empty row).how to take the data into sql server with
null instead of blank row.

thanks
murali


You need to use the BIGINT datatype. Recommend you lookup BIGINT in Books Online to see what it is and, possibly, lookup the other datatypes and read about them, as well. Datatypes are almost as important as the data itself.

So far as bringing in NULL's instead of blanks, I know virtually nothing about DTS or SSIS because I don't use them... I do use BCP and BULK INSERT extensively. Nulls will only occur if the data has two delimiters adjacent to each other with nothing inbetween. The -k parameter may help in that area but no guarantee's because I've not used it either. The reason is that I never import directly into a final table... too big a risk for too many reasons. I always import to staging tables and process from there. It's actually a pretty good habit to get into.

--Jeff Moden

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
SrikanthSv
SrikanthSv
SSC-Enthusiastic
SSC-Enthusiastic (139 reputation)SSC-Enthusiastic (139 reputation)SSC-Enthusiastic (139 reputation)SSC-Enthusiastic (139 reputation)SSC-Enthusiastic (139 reputation)SSC-Enthusiastic (139 reputation)SSC-Enthusiastic (139 reputation)SSC-Enthusiastic (139 reputation)

Group: General Forum Members
Points: 139 Visits: 112
Use a BIGINT Data Type as destination and try it

Regards
Venkat
http://sqlblogging.blogspot.com
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