Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: reverse pivoting

Re: reverse pivoting

From: Ganesh Raja <ganesh_at_gtfs-gulf.com>
Date: Tue, 12 Mar 2002 12:35:48 +0400
Message-ID: <fglmcsossi5lmvn2mkrggthlrkjga487mu@4ax.com>


On Mon, 11 Mar 2002 15:39:54 -0800, "Kenny Yu" <kyu_at_biodiscovery.com> wrote:

>Is there systematic approaches in data warehousing to do the following
>
>converting table Pivot (customer, product, amount) -- many rows per
>customer
>
>into table RPivot (customer, prod1Amt, prod2Amt, ... prodnAmt) -- one row
>per customer
>
>the columns in the RPivot table are the unique values in the Pivot.product
>column.
>
>I am interested in a pure SQL way.
>
>Thanks.
>

You can use the decode function or the Case function in SQL...

A Pure SQL Way...

HTH
[Additions and Corrections Always Welcome.] Best Regards,
Ganesh R Received on Tue Mar 12 2002 - 02:35:48 CST

Original text of this message

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