Hi. I'm a sql newbie, I use mssql2005
I like to do select with the condition which is depending on the input parameter
I've tried this.
WHERE CF.PROCESS_DATE = '2010-05-05' AND
CASE @CATEGORY_LEVEL
WHEN 'L' THEN CAS.MCATEGORY_ID = '' AND CAS.SCATEGORY_ID = ''
WHEN 'M' THEN CAS.SCATEGORY_ID = ''
END
but didn't work and happened an error.
sql is difficult to newbie programmer.. T.T