Quantcast
Channel: SCN: Message List - SAP HANA and In-Memory Computing
Viewing all articles
Browse latest Browse all 8968

Re: Numeric overflow error while calculation

$
0
0

Rajesh,

 

although you defined the result data type as decimal in the output structure, you don't take care of actually making sure that the result fits this data type.

 

So, for your code, you might go with something like this:

 

select a,b,.....

,

to_decimal (CASE

                    WHEN "Field1"=1  THEN

                                   1/7

                    ELSE

                              "Field1"*"Field2"/"Field3"

                    END,

                    16, 5)  AS "Field4",

from

     table a, table b

 

 

- Lars


Viewing all articles
Browse latest Browse all 8968

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>