using case statement

From: Pintu <priyabratabehera_at_gmail.com>
Date: Tue, 11 Mar 2008 20:38:25 -0700 (PDT)
Message-ID: <882395c7-2d2e-4d72-9d62-f2f155aea3fd@e25g2000prg.googlegroups.com>


Hi Friends,
 I want to use "in" clause in case statement as shown below. e.g
select * from employee
where empid in

               case i_desgn
                when 'HR' then (1,2,3,4,5)
                when 'MD' then 1
                else   7
                end

Though i did this using if-elsif but there is repetation of query. So i want this way to implement..Please help as soon as possible..

Thanks
Priyabrata Received on Tue Mar 11 2008 - 22:38:25 CDT

Original text of this message