|
shanish
Starting Member
2 Posts |
Posted - 03/15/2012 : 01:48:38
|
I have a query here,
I have a table consist of a column 'Marks'. In that marks I've to check whether it is greater than 50 or not. If it is 50 its pass else fail, for this I wrote a query as
SELECT MARKS,
CASE WHEN MARKS >= 50 THEN 'PASS'
ELSE 'FAIL'
END AS STATUS
FROM TABLENAME
here I can get the expected result, but the problem is I need to give a parameter as, if I give 0 it shold display only the fail results, and if I give 1 should show only pass, if 2, both fail and pass.........how is it possible can anyone help me |
|