rounding off of decimal digits in ORAOCI 9i stage

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
sb2212
Participant
Posts: 36
Joined: Mon Apr 28, 2008 1:22 am

rounding off of decimal digits in ORAOCI 9i stage

Post by sb2212 »

Hi all,

In my target table,I've a column P_ID which is given by Measure/Rate,Measure and Rate coming from the source table.

The value getting into P_ID after the division is getting rounded off. For Eg., If the actual value after the division is 122.91,P_ID will get populated as 123, If the value is 0.7,P_ID gets 1.

I want to load P_ID with the actual values i.e,122.91,0.7 etc and not the rounded value.

Could anyone suggest any y this is happeneing and any possible solution.

I am using server edition 6.0 and the target is a ORAOCI9i stage.

There is no warning or error as such.

Thanks.
DS_SUPPORT
Premium Member
Premium Member
Posts: 232
Joined: Fri Aug 04, 2006 1:20 am
Location: Bangalore

Post by DS_SUPPORT »

What is the data type of the column P_ID in your target, and how you have defined in your job?
sb2212
Participant
Posts: 36
Joined: Mon Apr 28, 2008 1:22 am

Post by sb2212 »

Its Decimal and length 60.
sachin1
Participant
Posts: 325
Joined: Wed May 30, 2007 7:42 am
Location: india

Post by sachin1 »

please specify the decimal length and scale in OCI stage.
sb2212
Participant
Posts: 36
Joined: Mon Apr 28, 2008 1:22 am

Post by sb2212 »

The Length of P_ID in OCI stage is 38 and the data type is Decimal.There is no scale.
sachin1
Participant
Posts: 325
Joined: Wed May 30, 2007 7:42 am
Location: india

Post by sachin1 »

dear you have to specify the scale if you want to have decimal values in database.

oracle oci stage ---->Inputs---->columns----you will see column name,length,scale.........etc
sb2212
Participant
Posts: 36
Joined: Mon Apr 28, 2008 1:22 am

Post by sb2212 »

I tried the same in oracle writing a query and inserting into the same target table.

But there I am getting currect result without specifying scale.
sb2212
Participant
Posts: 36
Joined: Mon Apr 28, 2008 1:22 am

Post by sb2212 »

Well using NumericRound4 in DS Transform sorts this problem.
Post Reply