Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do you pickup null (or empty) data fields in a sql query?

Status
Not open for further replies.

ts568

Programmer
May 9, 2007
14
GB
I have an entity which I would like to create a query which will look into the entity and give me all of the orders which have not got a staff member assigned to them.
I have done the query the way I believe it needs to be, however a blank table is showing up when it is executed.

SELECT ORDER.*
FROM ORDER
WHERE (((staffNumber) = 'null'));

I am guessing that null is not accepted by sql. I just need it to pick up when the staffNumber box is blank, and display that row.
 
SELECT *
FROM ORDER
WHERE staffNumber Is Null

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top