I want to return a value into an alias from a case argument. I’ve tried various connotations around the following
CASE dbo.sch_group.group_code WHEN 'ERDS' THEN '1' AS alias_name
but I get incorrect syntax warnings near the alias
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You’re missing an END (CASE on MSDN). This is a “simple CASE expression”
If you have more conditions then it would be this
I also assume this is in a SELECT or such