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: create columns from rows in a query

Re: create columns from rows in a query

From: Karsten Farrell <kfarrell_at_belgariad.com>
Date: Fri, 14 Feb 2003 18:20:08 GMT
Message-ID: <MPG.18b6d332442ee2649896a7@news.la.sbcglobal.net>


iltrex_at_libero.it said...
> > You can do it with CASE and TRANSLATE but the circumstances under which
> > they would work will be substantially different. I'd say stick with
> > DECODE unless you have a compelling reason to need the other
> > functionality.
>
> I was wondering if there is the possibility to create columns
> automatically without even knowing at desing time how many of them
> there will be (example, a different column for every different value
> of the mail field).
>
> I don't think it is possibile...
>

You might get what you're looking for from this Tom Kyte article, where he writes a procedure to load data from a dBASE file (with an unknown layout at design time):

http://asktom.oracle.com/pls/ask/f?p=4950:8:2074969::NO::F4950_P8 _DISPLAYID,F4950_P8_CRITERIA:711825134415,%7Bdbms_sql%7D%20and%20%20% 7Bcreate%20table%7D

If that URL wraps, you can go to http://asktom.oracle.com and search for "dbase" (without quotes).

-- 
/Karsten
DBA > retired > DBA
Received on Fri Feb 14 2003 - 12:20:08 CST

Original text of this message

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