Home Forums SQL Server 2005 SQL Server Express using case in where clause having other conditions RE: using case in where clause having other conditions
ssurekha2000
SSCommitted
Points: 1860
More actions
June 13, 2013 at 2:39 am
#1623595
i got it using
where id=@id
and (
(@con=0 AND YEARMONTH >=Replace(@YearMonth,'-',''))
OR (@con<>0 AND YEARMONTH <>Replace(@YearMonth,'-',''))
)