var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
I'm looking for information on SQL syntax for pivoting data, for crosstab output. I do not know what keywords to search on. Could someone provide?
Sometimes called a "pivot" query, you can do it like this:
Is that what you had in mind?
sum(decode(job,'MANAGER',sal,0)) as manager_sal,
sum(decode(job,'CLERK',sal,0)) as clerk_sal,
group by deptno;
That is what I had in mind, but I was hoping that Oracle had a keyword, like MSAccess's TRANSFORM, which pivoted data without knowing the number of columns that would be generated in advance.