Loading data into Oracle datatype Number()

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
sonia jacob
Participant
Posts: 122
Joined: Mon Jul 05, 2004 1:33 pm
Location: MA

Loading data into Oracle datatype Number()

Post by sonia jacob »

Hi All,

The Oracle table that I load into has a column of datatype Number(). No scale or precision is defined. The precision p can range from 1 to 38. The scale s can range from -84 to 127.

I used float in Datastage to load data into the table. But the values loaded was not as expected

source value : 1000.99999999999999999999999
expected target value : 1000.99999999999999999999999
actual target value : 1001. 00000000000000

source value : 3333333333333333333333333333.26
expected target value : 3333333333333333333333333333.26
actual target value : 3.33333333333333E27

Why is that when a decimal values are getting rounded off?
I am able to fix this issue by using varchar as the datatype in DS and using to_number in the insert / update SQL :( .
Any suggestions / solutions to the issue would be greatly appreciated. Thanks

Note : I tried with sqlplus too thinking that its something related to the tool.





Regards
Sonia Jacob
Post Reply