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 tables use

Re: Pivot tables use

From: DA Morgan <damorgan_at_x.washington.edu>
Date: Wed, 02 Feb 2005 19:45:55 -0800
Message-ID: <1107402193.820151@yasure>


Jawahar Rajan wrote:

> All,
> I have an interesting query to develop at work
> I am thinking that pivot tables may help though I am not sure.
> What I have is:
>
> Table response
> ID PatID Q_ID Response
> 1 101 1 Yes
> 2 101 2 No
> 3 101 3 Yes
> 4 102 1 No
> 5 102 2 No
> 6 102 3 Yes
>
>
> Table Question
> ID Q_ID Q_Text
> 1 1 Do you Agree with fruits?
> 2 2 Do you want Fruit?
> 3 3 Do you Like Apples?
>
> I am after this:
>
> PatID Do you Agree with fruits? Do you want Fruit?
> Do you Like Apples
> 101 Yes No
> Yes
> 102 No No
> Yes
>
> I am not quite sure if a pivot table will be useful or not
> As can be seen the Q_Text values need to be the column headers and the
> reponses to each Q_Text for each patient needs to be in one row.
>
> Any guidence or suggestions are appreciated
>
> Jawahar

http://www.psoug.org
click on Morgan's Library
click on DECODE

Pivot your data and find out.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace 'x' with 'u' to respond)
Received on Wed Feb 02 2005 - 21:45:55 CST

Original text of this message

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