Page 1 of 1

Floating Point Error

Posted: Thu Oct 02, 2008 3:14 am
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.

Posted: Thu Oct 02, 2008 6:17 am
by ArndW
What floating point error do you get after changing the scale?

Posted: Fri Oct 03, 2008 1:14 am
by yuva010
Its warning rather, it says, possible loss of data.

Posted: Fri Oct 03, 2008 7:05 am
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)?

Posted: Fri Oct 03, 2008 9:02 am
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.