Null Values

G

Guest

In a SQL query is there a way to sort my records in decending order by date
but still keep the records with a null date at the beginning of the results?
We have contracts in order by the effective date. I am pulling the most
current contract but they don't get an effective date until all signatures
are received so the date will be null.

Thanks in advance,

Suzie
 
K

Ken Snell [MVP]

Add a calculated field to the query:
SortField: Nz([RecordDate], Date()+100)

Then sort descending on SortField.
 
G

Guest

So simple! Thanks a bunch!

Ken Snell said:
Add a calculated field to the query:
SortField: Nz([RecordDate], Date()+100)

Then sort descending on SortField.

--

Ken Snell
<MS ACCESS MVP>

Suzie Raboin said:
In a SQL query is there a way to sort my records in decending order by
date
but still keep the records with a null date at the beginning of the
results?
We have contracts in order by the effective date. I am pulling the most
current contract but they don't get an effective date until all signatures
are received so the date will be null.

Thanks in advance,

Suzie
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top