Can any one tell how can we write a query which will fetch the data in matrix format..
[B]Question asked by visitor Sethu Murugan[/b]
Printable View
Can any one tell how can we write a query which will fetch the data in matrix format..
[B]Question asked by visitor Sethu Murugan[/b]
try this sample code
u might get what u are looking for
[code]SELECT job,
sum(decode(deptno,10,sal)) DEPT10,
sum(decode(deptno,20,sal)) DEPT20,
sum(decode(deptno,30,sal)) DEPT30,
sum(decode(deptno,40,sal)) DEPT40
FROM emp
GROUP BY job
ORDER BY job[/code]