Floating Point Error

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
yuva010
Participant
Posts: 36
Joined: Thu Apr 24, 2008 7:12 pm

Floating Point Error

Post by yuva010 »

Hi,
We are having query with Sum(Col1).

When we are trying to fetch records from Oracle Stage its showing warning possible truncation of scale from Decimal (38,10) to Decimal (38,2).

We changed column scale to Decimal(38,10) then it gives floating point error.

If we select column without any Sum it doesn't give any warning.

Is there possible resolution.
Thanks,
Yuva.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

What floating point error do you get after changing the scale?
yuva010
Participant
Posts: 36
Joined: Thu Apr 24, 2008 7:12 pm

Post by yuva010 »

Its warning rather, it says, possible loss of data.
Thanks,
Yuva.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

I am still unsure of what your actuall error or warning is. You need to make sure that the Oracle stage produces a format that the stage can use. Have you tried using an Oracle CAST... function to ensure that the format of the SQL SUM() function is decimal(38,10)?
yuva010
Participant
Posts: 36
Joined: Thu Apr 24, 2008 7:12 pm

Post by yuva010 »

We didn't used any Cast function, because
Select Col1, Col2 from Table1 ---- Works fine
Select Sum(Col1), Col2 from Table1 group by Col2 ---- gives error.

Col1 is decimal (38,2)

We tried with Server Job, it works fine.
Thanks,
Yuva.
Post Reply