Page 1 of 1

Truncation of Decimal Values

Posted: Thu Jan 17, 2013 9:47 pm
by mac4rfree85
Hi Guys,

I am receiving data in Flat file. I am reading it as a Varchar and loading it to Oracle Table (Double datatype). It is loading properly (1344.324).

In an another job, when i am reading it using Oracle Connector stage (Double Datatype), i am able to see the data is coming properly as 1344.324 in View Data.
After the Oracle stage, i have a transformer stage(Double Datatype). I am routing the data to Peek Stage (Double Datatype), i am seeing the data has been truncated to 1344.32
The target table is also loaded with incorrect data 1344.32.

This is happening only with values having more than 2 decimal values.

Can somebody point me out where i am doing something wrong.

Thanks for your help in advance.

Cheers!!!!

Posted: Fri Jan 18, 2013 2:19 am
by ArndW
Often this is just a display issue, not an actual truncation. You can put an output link on your peek to a flat file and see if the value is also truncated in the flat file.
Also, what did you specify for the length and scale of the double datatype and is it different in the peek stage?

Posted: Fri Jan 18, 2013 7:16 am
by mac4rfree85
Even in the Flat file, i am getting the value truncated.

I have given length as 22 and scale as 10 (same as Database)

Please let me know if i am missing out something. Is there any environmental variables which may restrict the decimal values?

Posted: Mon Jan 21, 2013 12:08 am
by harishkumar.upadrasta
Hi,

Please refer the below link for Datastage and Oracle Datatype considerations.


http://publib.boulder.ibm.com/infocente ... types.html

Please try using Decimal(22,10) in your transformer and let us know if this fixes your issue.