Home Forums SQL Server 2005 T-SQL (SS2K5) using case when condition in WHERE in SP RE: using case when condition in WHERE in SP
ParulPrabu
SSCrazy
Points: 2271
More actions
September 30, 2013 at 2:02 am
#1654453
Hi,
Try with this code
where id=@id and month=@month and Eid=
case when @Eid=0 then case when Eid>0 then Eid else 0 end else @Eid end =Eid