Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Analyzing This Query?
TIA, the two column involved are not just being checked for a value,
but the two values are being converted into 10 columns for each row in
the result set. That makes this a pivoting or pivot table problem.
There are other ways to pivot the table.
You can search the group archives (via google) or visit the http://asktom.oracle.com site and search on pivot to find alternate solutions.
The posted code has the advantage of being simple to understand. You could substitute a CASE statement for the decodes.
HTH -- Mark D Powell -- Received on Mon Feb 13 2006 - 11:02:29 CST