Page 1 of 1

Int32 to Decimal conversion.

Posted: Fri May 28, 2010 1:43 pm
by dsdevper
Hi ,

Source and Target both are Oracle.

My source column in defined as Number(3,0) and target is defined as Number(3,0). Even though they are same datatypes. I am getting following error.

"" When writing column INT32 into database column DECIMAL(3,0), truncation, loss of precision or data corruption can occur.; CC_DBSchemaRules; reportSizeMismatch; CC_DBSchemaRules.cpp; 1575) "".

I tried loading values hard coded as 1. Then also i am getting error.
I tried using AsDouble() and AsFloat().

But still same error.

Please any Help.

Thanks

Posted: Fri May 28, 2010 4:11 pm
by Sreedhar
I assume that you have just like

Read Oracle -> Load Oracle.

Can you provide with your Job design.
That should help us give some Idea of what is going wrong.

Posted: Sat May 29, 2010 3:52 am
by ray.wurlod
Int32 can have up to 10 digits. Decimal(3,0) may only have a maximum of three digits. Somewhere, something is representing data as Int32. You have to find it.

Posted: Wed Jun 02, 2010 3:01 pm
by dsdevper
Sreedhar : My job design is Reading from Sybase database lookup with oracle table and load oracle table values to target oracle table.

oracle(Number(3,0))
|
|
Sybase --------Lookup---------Oracle(Number(3,0))

Ray : i even tried

1)creating a transformer in which i hard coded a value and defined as char. and before inserting i used string to decimal conversion.

2) i tried inserting the char field into Number(3,0) field.then also i am getting the same error.

""T_Table: ?? (IIS-CONN-DAAPI-000398; Schema reconciliation detected a size mismatch for column COLUMN1. When writing column INT32 into database column DECIMAL(3,0), truncation, loss of precision or data corruption can occur.; CC_DBSchemaRules; reportSizeMismatch; CC_DBSchemaRules.cpp; 1575) ""

Thanks

Posted: Wed Jun 02, 2010 4:56 pm
by ray.wurlod
Re-read my response. DataStage is alerting you to the fact that some integers have more than three digits, so you may end up losing data.

Posted: Wed Jun 02, 2010 8:44 pm
by asorrell
Did you try actually defining your column as decimal instead of numeric?