Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> record type question?
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 Received on Fri Dec 31 2004 - 12:41:59 CST