Page 1 of 1

Floating issue

Posted: Tue Dec 02, 2008 7:46 am
by nani0907
Hi all

i am getting the below error from the oracle query used.

floating point decimal is not fully supported; adjusting the scale.

Ora query used.
SELECT
DECODE(FN.column A,NULL,'NULL',FN.column A) AS column A,
SUM(CAST(FN.column B AS DECIMAL(38,10))) AS column B
FROM
Table FN
WHERE
FN.DATE=to_date(20071231,'yyyymmdd')
GROUP BY
column A

In oraclestage,mentioned column as decimal 38,10.

Please help me for the above issue.

Aslo unable to view premium content.

Re: Floating issue

Posted: Tue Dec 02, 2008 8:11 am
by chulett
nani0907 wrote:Also unable to view premium content.
I really don't understand why people feel the need to mention this. It is obvious who is a Premium member and who isn't, that's clearly marked on every post. All this statement says is you don't want any of the Premium posters to help you. So be it.

Posted: Tue Dec 02, 2008 8:34 am
by nani0907
I donot mean that.
sorry for mentioning it.

Posted: Tue Dec 02, 2008 8:38 am
by chulett
What is the definition of "Column B" in the Oracle table? Why do you feel the need to CAST the column during the select?

Posted: Tue Dec 02, 2008 8:46 am
by nani0907
Hi,


The column B is mentioned as Number datatype in oracle table without length.

Posted: Tue Dec 02, 2008 8:52 am
by chulett
Figured as much. What about the second question?

Posted: Tue Dec 02, 2008 9:01 am
by nani0907
I have imported the meta data from the Orch schema definitions which shows as decimal 38, 10 . hence used the cast function to do the same.

Posted: Tue Dec 02, 2008 9:10 am
by Mike
Not sure if it will matter, but...

How about CASTing the SUM instead of SUMing the CAST?

Mike

Posted: Tue Dec 02, 2008 11:21 pm
by nani0907
I have casted the sum and the issue is resoved.

Thanks mike