I need to write a sql statement to select all users ordered by lastname, firstname. This is the part I know how to do :) What I don\'t know how to do is to order by non-nu
See Sort Values Ascending But NULLS Last
basically
SELECT * FROM @Temp ORDER BY CASE WHEN LastName IS NULL THEN 1 ELSE 0 END, LastName