kavya.jain kavya.jain - 4 months ago 26
SQL Question

Oracle math functions

I am trying to get a rounded value in Oracle (using SQL Developer) through following statement:

ROUND((1-POWER((SUM(D.PFY/100*E.OUT_8_)/SUM(E,OUT_8_)), (1/(SUM(PHOTO*E.OUT_8_)/SUM(E.OUT_8_)))))*1000000, 0) AS PFYPPM


However, I am getting an error as:


invalid number of arguments.


What is it that I am doing wrong?

Answer

Sometimes Oracle error messages are actually helpful.

invalid number of arguments

Check your function calls.

sum() takes only one argument.

SUM(E,OUT_8_) 

should probably be

SUM(E.OUT_8_)
Comments