Unable to Insert decimal value to oracle DB

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
snt_ds
Premium Member
Premium Member
Posts: 280
Joined: Wed Oct 18, 2006 11:53 am
Location: Pune, India

Unable to Insert decimal value to oracle DB

Post by snt_ds »

Hi Dsxians,

I am facing with a warning in datastage job and issue of insering decimal values into oracle DB.

I have a multiplication of two string values from source file after converting from string to decimal 28,12 and doing a

multiplication and storing in a target column of decimal 28,12.

SVFirstval= 0000000784752326.540000000000

SVsecondval= 0000000000011100.000000000000

SVCal= 0008710750824594.000000000000(SVFirstval*SVsecondval)

I am getting the below warning for the calculated values in stage variable and while inserting target column,

job aborted with invalid integer as error.

Warning:
APT_Decimal::operator=: the source decimal has even precision, but non-zero in the leading nybble, or is too large for the destination decimal.

Database column is of size is of decimal 28,12.Could you please help me in resolving this.
Thanks
snt_ds
snt_ds
snt_ds
Premium Member
Premium Member
Posts: 280
Joined: Wed Oct 18, 2006 11:53 am
Location: Pune, India

Post by snt_ds »

Hi

If anyone faced this type of issue,Could you please help me?
Thanks in Advance.
snt_ds
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Be patient, if someone can I'm sure they will.

In the meantime, did you try searching the forums for your error message? I got 9 other hits on "non-zero in the leading nybble", did none of those help you?
-craig

"You can never have too many knives" -- Logan Nine Fingers
snt_ds
Premium Member
Premium Member
Posts: 280
Joined: Wed Oct 18, 2006 11:53 am
Location: Pune, India

Post by snt_ds »

Thanks chulett for the reply.
I am sorry for being so quick.

I have gone through those 9 posts already.but none helped me.Any knows
why this value 0008710750824594.000000000000 is not accepting
in an oracle table column of datatype number(28,12)?
snt_ds
kandyshandy
Participant
Posts: 597
Joined: Fri Apr 29, 2005 6:19 am
Location: Singapore

Post by kandyshandy »

Can you have a seq file output in addition to the DB stage and see what is the value it is trying to insert for the calculated field?

Also, check the data type of the stage variable? You may want to define it as a decimal with proper scale/precision.
Kandy
_________________
Try and Try again…You will succeed atlast!!
snt_ds
Premium Member
Premium Member
Posts: 280
Joined: Wed Oct 18, 2006 11:53 am
Location: Pune, India

Post by snt_ds »

Hi,

Before writing to the database,I am writing to a dataset and peekstage with target column decimal(28,12) and the value displayed as 0008710750824594.000000000000.

My table target column is number(28,12).I don't know why this value is
not accepting in table.Thanks.
snt_ds
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Can you insert/update such a value in the table manually?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply