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: DA Morgan <damorgan_at_x.washington.edu>
Date: Thu, 11 Nov 2004 20:31:48 -0800
Message-ID: <1100233831.459485@yasure>


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

http://www.psoug.org
click on Morgan's Library
click on DECODE

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace 'x' with 'u' to respond)
Received on Thu Nov 11 2004 - 22:31:48 CST

Original text of this message

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