Here is my code:
Select
cname,
case
WHEN cid < 35 then 'Failed'
WHEN cid > 35 AND < 50 then 'Below Average'
WHEN cid > 50 AND < 60 then 'Average'
WHEN cid > 60 AND < 70 then 'Good'
WHEN cid > 70 AND < 85 then 'Distinction'
WHEN cid > 85 then 'Outstanding'
end as Report
from cus
I don't know what was the wrong with above code. It is not getting executed correctly.
It is showing the result likes this.
Msg 102, Level 15, State 1, Line 3
Incorrect syntax near '<'.
May I know what mistake I have made, and how to overcome it ?