Hi all
I have an Access database Table and one of the columns has a date value the column name is closing.
I would like to do an order by closing asc the null values are allways on top and I would like it to be at the bottom.
I have googled for a solution and I came up with this

Dim SelectQueryString As String = "SELECT * FROM " & Filter & " order by case when Closing is null then 1 else 0 end, Closing"

When executing this query I get Unrecognized keyword WHEN error.
thanks in advance

Recommended Answers

All 2 Replies

Case won't work in Access.
Try a statement like
select * from table order by closing Is Not Null, Closing

thanks Adam for your reply.
I have tried and it works.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.