rogerzebra
Technical User
Hi All.
I can't get this nested decode statement to work. I'm not so familiar with Oracle, so please bear with me. I have tried to use a case statement aswell but, I obviously need help with this. So, if someone could give me some directions on how to do this with either a case statement or a decode would much appreciated.
Thanks in advance
This is what I'm trying to do (case when column1 <> '02' and column2 in ('a','b','c') then count polices in column2) end as test
I can't get this nested decode statement to work. I'm not so familiar with Oracle, so please bear with me. I have tried to use a case statement aswell but, I obviously need help with this. So, if someone could give me some directions on how to do this with either a case statement or a decode would much appreciated.
Thanks in advance
This is what I'm trying to do (case when column1 <> '02' and column2 in ('a','b','c') then count polices in column2) end as test
Code:
Here is the real query
select decode(column1,'a','b','c',decode(Column,'02','N'))
,count(1)
from (select columns...
,sum(column3)
from table1 a, table b
where a...= b.
and b... = ('Program')
and a.column1('a','b','c')
and b...date between to_date ('04/01/2006','mm/dd/yyyy')
and to_date('12/31/2006','mm/dd/yyyy')
group by a.pol
,a...
,a...
,b... )
group by ..