Need blanks to be moved to the bottom of records

  • Thread starter Thread starter Preston
  • Start date Start date
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.
 
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...
 
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
 
Back
Top