How to do a percentage calculation in Oracle?

1

I can not make a Select that can do 1 IPI calculation in Oracle.

Table VS01
Fields:
PD = 001
TP = 100 reais
IPI = 15

Select PD,TP,IPI,

       TP * IPI% AS TOTAL <<< aqui que não consigo executar

From VS01

PD || TP || IPI || TOTAL

001 100 15 115

    
asked by anonymous 28.03.2017 / 14:51

1 answer

3

It's pure math:

Select PD, TP, IPI, TP * (1.00 + IPI / 100) AS TOTAL

You might want to do some rounding.

    
28.03.2017 / 14:57