thebull1
Programmer
- Oct 24, 2001
- 68
Hi All?
I am working on a matrix query whereby I do not want to specify the columns
ie
Select job_id, (row 1..n of table emp should be the columns) from emp;
Old way
------------
Select job_id, decode (dept id,10) "Dept 10",...
decode (dept id,n) "Dept n",
from emp;
Basically you have an arbitrary table emp. This table contains employee details including department code. I Want to group some data by department
Eg the final report will be Job title Dept A, Dept B, Dept C, ..., Dept z
imagine you have 1000 departments you do not want to use the decode command to pick each department since this will mean writing 1000 decode statements.
I want to write on single matrix query wihout using the decode statement.
Kindly assist.
I am working on a matrix query whereby I do not want to specify the columns
ie
Select job_id, (row 1..n of table emp should be the columns) from emp;
Old way
------------
Select job_id, decode (dept id,10) "Dept 10",...
decode (dept id,n) "Dept n",
from emp;
Basically you have an arbitrary table emp. This table contains employee details including department code. I Want to group some data by department
Eg the final report will be Job title Dept A, Dept B, Dept C, ..., Dept z
imagine you have 1000 departments you do not want to use the decode command to pick each department since this will mean writing 1000 decode statements.
I want to write on single matrix query wihout using the decode statement.
Kindly assist.