• 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