SQLTeam.com | Weblogs | Forums

Case statement

hi
I am trying as below but getting error
select case when actype in (1,2,3) then 'aop' else ' ' end as label

please help

what is the error?

my actual query is

Bcase a.AcctType
when in (43,41,47,85,80,81,66,44) then 'AOP'
when in (67,18,55,13,21,88,46,14,69,11,20,52,90,42,61,58,74,83,5,37,76,22,15,25,35,91,19,56) then 'Others'
when in (32,84,60,24,12) then 'Corporate'
when in (50,30,4,70,87,82) then 'Trust'
when in (8) then 'HUF'
when in (53) then 'NPO'
when in (71) then 'PEP'
else end from D009022
ockquote
the error is
Incorrect syntax near the keyword 'in'.

hope this helps

thanks
sir
I got the correct syntax
thanks again

thanks sir
Got the correct sysntax
thanks a lot sir

got the correct syntax
thanks lot sir