Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: record type question?

Re: record type question?

From: DA Morgan <damorgan_at_x.washington.edu>
Date: Fri, 31 Dec 2004 12:12:17 -0800
Message-ID: <41d5b183$1_1@127.0.0.1>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US