sql Statement

William Thys

New member
Joined
Aug 29, 2003
Messages
1
SELECT * FROM tblworker WHERE NOT priority IS NULL ORDER BY priority
UNION
SELECT * FROM tblworker WHERE priority IS NULL

why does this code NOT work in SQL???????????
without the ORDER BY priority it does work!
 
In addition to JABEs comment (which is the right answer):

Id change your first WHERE to:
SELECT * FROM tblworker WHERE priority IS NOT NULL
instead of
SELECT * FROM tblworker WHERE NOT priority IS NULL

Its more readable and its whats recommended.

Also, theres a Database forum where you might get more help than Windows Forms for SQL questions :)

-Ner
 
Back
Top