Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Interesting report problem 8i
GW wrote:
> Folks, I am looking to see if anyone has a suggestion to approach this
> problem :
>
> I have a set of tables that I will process with cursors to extract raw data
> for a reporting process. I will likely grab this data and add it to a
> PL/SQL table to massage it further. In other words, I will have the data
> available to me in "vertical" format.
>
> <snipped>
> Essentially I am trying to take a vertical store of data and turn it
> horizontal. Usually I approach this with dynamic views (i.e. one (select
> a,b,c from table) statement per report column), and then select my final
> set of data from the various views. In this case the number of columns will
> likely be variable. Plus I would have to use outer joins between each
> dynamic view - the processing costs would be prohibitive.
>
> <snipped>
>
>
> Cheers
> Gary Wood
> gwood_at_eli.net
If I understand your intent ... you are making a simple problem difficult. You can use DECODE to cross-tab rows to columns. Numerous examples are all over the web. Try google.com archives for the c.d.o. groups, http://asktom.oracle.com and http://tahiti.oracle.com.
Daniel Morgan Received on Sat Mar 22 2003 - 14:53:05 CST