christopher sawtelle 2 Posted July 24, 2013 Share Posted July 24, 2013 I am trying to write a case statement. If I do it as follows it works: case when "13 3/8 IN" then 13.375 end When I add multiple lines (whens) it errors (just says "the expression is not complete") such as: case when "13 3/8 IN" then 13.375 when "10 3/4 IN" then 10.75 end Both lines work when they are the only one. I have not used the Case statement before so this is uncharted territory! Link to comment Share on other sites More sharing options...
christopher sawtelle 2 Posted October 23, 2015 Author Share Posted October 23, 2015 Figured it out. Didn't need more than once ... Link to comment Share on other sites More sharing options...
Donald Johnson Posted October 3, 2019 Share Posted October 3, 2019 I like the form: CASE [Variable] WHEN 'Red' THEN 1 WHEN 'Blue' THEN 2 WHEN 'Yellow' THEN 3 ELSE 0 END Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now