Hi,
Using Oracle 11g R2, with APEX 4.2.3, I am trying to take the following cross tab (pivot) built query:
begin
return 'with pivot_data as (
SELECT department_id, job_id, salary
FROM oehr_employees
)
SELECT *
FROM pivot_data
PIVOT (
SUM(salary)
FOR department_id
IN ('||v('P5_DEPT_LIST')||')
)';
end;
Which works just fine, and add in the comm column and also have the pivot sum and build department_id based columns.. I haven't found any documentation showing how to have multiple columns summed in a pivot query yet.
Any ideas??
Thank you,
Tony Miller
LuvMuffin Software
Ruckersville, VA