Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sort Date Question

Status
Not open for further replies.

susanh

MIS
Jan 16, 2001
229
US
Hi All,

Is it possible to sort my date column so the records that have blank dates are at the bottom of the list?

 
If it's query-based, you can order the query results by date DESCENDING. It they must be in ascending order with the blank dates last, you can do a couple of things:

1. Do a UNION query with the first being "real" dates and the second being blank dates;

2. Add a column to the query that is populated with 1 if the date is filled out and 2 if it isn't. Order by this column first, then the date.

Phil Hegedusich
Senior Programmer/Analyst
IIMAK
-----------
Not NULL-terminated yet.
 
What database are you using. I know in Oracle you can specify Nulls First.

----------------------------------
htower
if( !succeed ) try( );
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top