Click here to Skip to main content
15,894,540 members
Articles / Database Development / SQL Server

CASE/WHEN return type

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
24 Nov 2010CPOL 5.7K   1  
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...

Views

Daily Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Norway Norway
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions