Crystalboy1
Programmer
HI all,
I want to add a Case When statment after the where clause of a select statement. example given below, its not working please help.
select counter,sum(a),sum(b),sum(c) from
tablename
where
tablename.startdate=20080705
and case counter
when 24 then
tablename.employeenumber not in (20,30,40,50)
else
tablename.employeenumber not in (20,30,40)
end
order by counter
group by counter
I want to add a Case When statment after the where clause of a select statement. example given below, its not working please help.
select counter,sum(a),sum(b),sum(c) from
tablename
where
tablename.startdate=20080705
and case counter
when 24 then
tablename.employeenumber not in (20,30,40,50)
else
tablename.employeenumber not in (20,30,40)
end
order by counter
group by counter