SQL script is common language for web/database developers.
Sometime, a little bit tricky when you want to accomplish a request sound simple but yet challenging.
Case Study:
To sort a list of records with ‘Last Name’ ascending, but to make sure NULL value of ‘Last Name’ must at the end.
SELECT ID , LastName , FirstName , Email , Phone , Office FROM Table ORDER BY CASE WHEN LastName = '' THEN 1 ELSE 0 END, LastName
Incoming search terms:
- account inurl:/guestbook asp?sent=
- process inurl:/guestbook asp?sent=
- free mp3 ascending order
- case inurl:/comments asp
- sql order null at the end
- sql sorting null at the end