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: pivot/transform in Oracle

Re: pivot/transform in Oracle

From: DA Morgan <damorgan_at_psoug.org>
Date: Thu, 26 Jan 2006 14:25:12 -0800
Message-ID: <1138314309.750597@jetspin.drizzle.com>


oaksong_at_hotmail.com wrote:
> Using decode in Oracle I get the following (text wrapped here):
>
> DESC START_TIME SUNDAY MONDAY TUESDAY WEDNESDAY THURSDAY FRIDAY SATURDAY
> WATCH 1 0:00 CHARLES SMITH
> WATCH 1 0:00 CHARLES SMITH
> WATCH 1 0:00 CHARLES SMITH
> WATCH 1 0:00 CHARLES SMITH
> ------------------------------------------------------------------------------------------------------------------------
> So, for each day of the week I get a new entry of the name. The SQL is
> a series of DECODE statements:
> decode(x,date,name) as Sunday,
> decode(x,date+1,name) as Monday,
> decode(x,date+2,name) as Tuesday,
> etc. etc.
>
> In MS Access I can use Transform and Pivot and I get a single row of
> output.
>
> Is there a way to get the Oracle results to appear as a single row?
>
> TIA
As Anurag suggests search at asktom.oracle.com. Also look at the demos in Morgan's Library at www.psoug.org.

-- 
Daniel A. Morgan
http://www.psoug.org
damorgan_at_x.washington.edu
(replace x with u to respond)
Received on Thu Jan 26 2006 - 16:25:12 CST

Original text of this message

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