I have a salary table which has Amount
and Amount Precision
columns.
Using precision I want to get the actual amount.
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.