Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to order the null values?

Tags:

ms-access

Using Access 2003

In my table column, some of the fields are null, some of the fields are number, and some of the fields are string

Table.

ID, Value

001 
002 N/A
003 01
004  
005 N/A
006 02

So on...

I want to order the table by number, string then null values,

Query,

Select ID, Value from table order by value

Expected Output

    ID, Values

    003 01
    006 02
    002 N/A
    005 N/A
    001
    004

Need Query Help

like image 585
Gopal Avatar asked Dec 22 '22 10:12

Gopal


1 Answers

Create a new query, and insert the following SQL:

SELECT *
FROM Table1
ORDER BY IsNull([Text2]) DESC , Table1.Text2;

Change the names as appropriate.

like image 143
Robert Harvey Avatar answered Jan 11 '23 03:01

Robert Harvey