how to use case in store proceedure?
how to use case in store proceedure in sql server 2008?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sanjeeb LenkaPosted Jul 28, 2013, 4:01 AM
http://blog.sqlauthority.com/2007/04/14/sql-server-case-statementexpression-examples-and-explanation/
Iftikar HussainPosted Jul 28, 2013, 3:17 AM
Like this
SELECT EmpName, CASE IsActive WHEN 1 THEN 'Yes' ELSE 'No' End As IsActive
FROM Employee
Regards,
Iftikar