Need blanks to be moved to the bottom of records

G

GVaught

First question? Why are there blanks in your query? There should never be
blank records in a table. If you don't need the blanks, just set IS NOT NULL
against a field's criteria cell. This will only return fields that have data
in that field.
 
P

Preston

I have a whole table with data in it and I am sorting by
different columns. Sometimes when I sort by a column that
has other data in other columns but the column I sort by
has blank data. And I just want to sort them to the
bottom of my query...
 
J

John Spencer (MVP)

You need to do a two level sort then. Add a column to the query that tests if
the value in the relevant field is null and sort by that first and then by your
field.

SELECT ...
FROM ...
WHERE ...
ORDER BY IsNull(FieldA) Desc, FieldA
 

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