20% means 20/100. This is equivalent to a factor of 0.2 or .2
select ttlamt, ttlamt * 0.2 as percentage;
from MyTable;
into cursor Temp
>Can you please help me with the select query.
>
>I want to calculate the 20% amount of the total amount(which is ttlamt field name and the value in it is $10000) so when i run the query it should give me $2000 which is 20% of the ttl field amt.
>I never used a query with percentage calculation.
>
>Please let me know the Select statement for this query.
>
>table name is amounttable
>field name is ttlamt
>
>Thank you very much.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)