|
Posted by Jozef de Veuster on 07/25/05 16:53
Just for fun I tried your example using CASE..WHEN in the ORDER BY, but
I get the error:
Server: Msg 104, Level 15, State 1, Line 3
ORDER BY items must appear in the select list if the statement contains
a UNION operator.
It seems like the result of the CASE statement is a bit transformed, so
SQLServer doesn't recognize that field is already in the SELECT list. (I
tried with the DOSSIER_CODE column, without CAST or CONVERT)
Tim@Allgeier
*** Sent via Developersdex http://www.developersdex.com ***
[Back to original message]
|