Page 1 of 1

Unable to Insert decimal value to oracle DB

Posted: Fri Jan 16, 2009 10:31 am
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

Posted: Fri Jan 16, 2009 1:32 pm
by snt_ds
Hi

If anyone faced this type of issue,Could you please help me?
Thanks in Advance.

Posted: Fri Jan 16, 2009 2:59 pm
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?

Posted: Fri Jan 16, 2009 4:30 pm
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)?

Posted: Fri Jan 16, 2009 9:53 pm
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.

Posted: Fri Jan 16, 2009 10:45 pm
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.

Posted: Sat Jan 17, 2009 1:13 am
by ray.wurlod
Can you insert/update such a value in the table manually?