Nice question, good explanation. No SQL weirdness like that in yesterday's question, so much easier.
Hugo Kornelis (5/15/2013)
Dave62 (5/15/2013)
A minor typo in the explanation."... As soon as one evaluates to True, the corresponding ELSE is returned. ..."
ELSE should be THEN in that sentence.
and
hany.helmy (5/15/2013)
In the Explanation: "A CASE expression will always evaluate the WHEN clauses from top to bottom. As soon as one evaluates to True, the corresponding [ELSE] is returned."I think it should be the corresponding [THEN] not else, correct me if I am wrong.
You are both absolutely right. Sorry for that mistake. Unfortunately, I am unable to change the explanation. 🙁
Steve will correct it for you if you ask him (private message works quite well for that) - it is better if simple errors in questions are fixed so that people who come across them later are not confused or misled.
Tom