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

pivot/transform in Oracle

From: <oaksong_at_hotmail.com>
Date: 26 Jan 2006 13:43:17 -0800
Message-ID: <1138311797.521761.208950@f14g2000cwb.googlegroups.com>


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 Received on Thu Jan 26 2006 - 15:43:17 CST

Original text of this message

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