August 30, 2008 at 11:01 am
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
August 30, 2008 at 4:14 pm
Heh... do you think that 150,000,000,000 is gonna fit in an INT in SQL Server? 😉
--Jeff Moden
Change is inevitable... Change for the better is not.
August 31, 2008 at 12:55 am
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
August 31, 2008 at 9:33 am
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
Change is inevitable... Change for the better is not.
September 2, 2008 at 4:54 pm
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply