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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using ISNULL in WHERE criteria

Status
Not open for further replies.

davyre

Programmer
Oct 3, 2012
197
AU
Hi,
I got the SQL
Code:
SELECT TblCustOrder.PONumber, TblCustOrderUnit.OrderMethod
FROM TblCustOrder INNER JOIN TblCustOrderUnit ON TblCustOrder.CustOrderID = TblCustOrderUnit.OrderID
[highlight #FCE94F]WHERE (((TblCustOrderUnit.OrderMethod)="isnull"));[/highlight]

That does not work.
I tried this way:
Code:
SELECT TblCustOrder.PONumber, TblCustOrderUnit.OrderMethod
FROM TblCustOrder INNER JOIN TblCustOrderUnit ON TblCustOrder.CustOrderID = TblCustOrderUnit.OrderID
[highlight #8AE234]WHERE IsNull(TblCustOrderUnit.OrderMethod);[/highlight]
but when I save it, it automatically changed into the first SQL. How can I prevent that?
Or what is the correct way to do it?
 
Try
SQL:
SELECT TblCustOrder.PONumber, TblCustOrderUnit.OrderMethod
FROM TblCustOrder INNER JOIN TblCustOrderUnit ON TblCustOrder.CustOrderID = TblCustOrderUnit.OrderID
WHERE TblCustOrderUnit.OrderMethod is null;

Duane
Hook'D on Access
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top