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: rows as headers of columns

Re: rows as headers of columns

From: Bricklen <Xbricklen_at_yahoo.comX>
Date: Wed, 10 Nov 2004 03:31:53 GMT
Message-ID: <JYfkd.167886$Pl.135498@pd7tw1no>


Henry wrote:
> I like the following query results, in which one column contains the
> header names. How can I can modify the query to return results in a
> single statement.
>
> seq# category name
> ====== ======== =======
> 1 student jim
> 2 student John
> 3 student smith
> 4 student Fred
> 5 teacher Rob
> 6 teacher Adam
> 7 teacher Bill
> 8 teacher Tom
>
> The format I want will be like:
> seq# student teacher
> ====== ======== =======
> 1 jim
> 2 John
> 3 smith
> 4 Fred
> 5 Rob
> 6 Adam
> 7 Bill
> 8 Tom
>
> Thanks

go to asktom.oracle.com and search for transpose or pivot Received on Tue Nov 09 2004 - 21:31:53 CST

Original text of this message

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