SQL to Put Record for Current User First

I was recently asked how to show a record for the current user before the record for other users - in one query. Here is my solution.

[More]

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
Actually you can just move the case statement to the order by clause and it will have the same effect.

SELECT admin_id,FirstName,LastName
FROM admins
ORDER BY CASE
WHEN admin_id = #Val(Client.AdminID)# THEN 1
ELSE 0
END,
      LastName
# Posted By Qasim Rasheed | 5/10/06 1:42 PM
BlogCFC was created by Raymond Camden. This blog is running version 5.8.001.