Last active
February 19, 2016 23:46
-
-
Save alexanderjsingleton/6ae45917b2830789bb19 to your computer and use it in GitHub Desktop.
A SQL solution using a CASE statement.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT * FROM ( | |
SELECT student_id, | |
salutation, | |
CASE | |
WHEN salutation IN('Dr.') THEN 'Doctor' | |
END AS NewSalutation | |
FROM student.student | |
) | |
WHERE NewSalutation IS NOT NULL; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment