I am having problems using nested functions while also using 'group by' within a simple SQL statement.
The following SQL statement works ok:
Select
TABLE_A.REGION,
TABLE_A.sort,
sum(TABLE_B.COLA) "_2019_20",
sum(TABLE_B.COLB) "_2020_21",
sum(TABLE_B.COLC) "_2021_22"
from TABLE_A, TABLE_B
where TABLE_A.Obj contains TABLE_B.Obj
group by TABLE_A.REGION
order by TABLE_A.sort
into OUTPUT
But when I try to round the results - eg
Select
TABLE_A.REGION,
TABLE_A.sort,
round(sum(TABLE_B.COLA),1) "_2019_20",
etc
...I get this error:
Found [(] while searching for [)]. Invalid or missing argument list.
Is it possible to have nested functions within an SQL statement like this? If not, what is the alternative in the above example?
------------------------------
Matthew Lee
Deep End Services
South Yarra VIC
------------------------------