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: Query Generating Horizontal Totals

Re: Query Generating Horizontal Totals

From: Bricklen <bricklen-rem_at_yahoo.comz>
Date: Wed, 04 Feb 2004 22:08:52 GMT
Message-ID: <U3eUb.6816$An3.5841@edtnps84>


tranvirus wrote:

> Hi all,
>
> I have this table:
>
> Col1 Col2 Col3
> A A1 5
> A A2 3
> A A3 2
> A A4 4
> B B1 6
> B B3 8
> B B4 1
> C C1 3
> C C2 5
> C C3 8
> C C4 2
>
>
> I want to obtain this from my query:
>
> Col1 Col2 Col3 Col4 Col5
> A 5 3 2 4
> B 6 0 8 1
> C 3 5 8 2
>
> I guess there shuld be a way of doing this
> kind of operation in Oracle 9i but I don't
> find the right SQL query. All the help will
> be appreciated.
>
> Claudio Santana.

check asktom.oracle.com for "transpose" or "pivot" Received on Wed Feb 04 2004 - 16:08:52 CST

Original text of this message

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