I want to use a case when block in the where condition: I am trying to use the below not working, is it possible to use within where condition. Thanks a lot for the helpful info.
where rm.ProgID <> 70
and rm.progid = @progid
and CASE @progid
WHEN '' THEN '1=1'
ELSE rm.progid = @progid
and CONVERT(varchar(10), rm.rmloggeddate, 101) between CONVERT(varchar(10), @startdate, 101) and CONVERT(varchar(10), @enddate, 101)
order by rm.sequenceno,MR.step;