How to use case in store proceedure?
how to use case in store proceedure in sql server 2008?
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Iftikar HussainRank #423 · 5.9K reputationPosted Jul 27, 2013, 11:17 PM EDT
Like this
SELECT EmpName, CASE IsActive WHEN 1 THEN 'Yes' ELSE 'No' End As IsActive
FROM Employee
Regards,
Iftikar
Sanjeeb LenkaRank #301 · 8.3K reputationPosted Jul 28, 2013, 12:01 AM EDT
http://blog.sqlauthority.com/2007/04/14/sql-server-case-statementexpression-examples-and-explanation/