Posted: 24 Nov 2010
Updated: 24 Nov 2010
Rating: 0.0 / 5
Licence: The Code Project Open License (CPOL)
Unless you are placing this code in a stored procedure, you could just as well do this:SELECT *FROM ( SELECT 'A1' AS String1,'B1' AS String2, GETDATE() AS DateCol UNION ALL SELECT 'A2','B2', GETDATE()) AS dORDER BY And then append the sanitized column name to sort...