Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: rows as headers of columns
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