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: help in writing an sql

Re: help in writing an sql

From: <vikas.chahal_at_gmail.com>
Date: 2 Feb 2005 20:26:51 -0800
Message-ID: <1107404811.384205.168400@z14g2000cwz.googlegroups.com>


A simple query to have the above result could be

select sch_wkid, sch_date, decode(sum(xc),0,'No', 'Yes'), decode(sum(yc),0,'No', 'Yes')
from
(select sch_wkid, sch_date, decode(sch_act,'X',1,0) XC, decode(sch_act,'Y',1,0) YC
from tab1)
group by sch_wkid, sch_date Received on Wed Feb 02 2005 - 22:26:51 CST

Original text of this message

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