Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: record type question?
name wrote:
> I would to build a stored procedure that would be able to transpose rows
> into columns based on a delimited list of keys. Currently, I have a view
> that accomplish this transformation, where a key is tied to an in-line view.
>
> My first idea is to use a Record where I dynamically create columns based on
> the number of keys passed to the proc.
>
> My second idea is repetitively call a procedure that returns a two-column
> Record (an id column and a value column), then somehow combine these Records
> into a single Record with multiple columns (id,value0,value1...).
>
> Are either of these approaches technically feasible? Is there better
> approach? I'm using Oracle 9i.
>
> Thanks,
>
> Craig Buchanan
Look at pipelined table functions.
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace 'x' with 'u' to respond)Received on Fri Dec 31 2004 - 14:12:17 CST