Skip to content
Advertisement

Amount Calculation using Precision

I have a salary table which has Amount and Amount Precision columns.

Using precision I want to get the actual amount.

enter image description here

Please help me to calculate actual amount using precision.

Advertisement

Answer

You can use the following query:

select CAST(Amount as double precision) / power(10,  AmountPrecision) from AmountTest

Assuming AmountTest is the name of the table. You can replace it with the name given by you.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement