|
-
April 1st, 2001, 10:13 PM
#1
That is Null and Is not Null problem
Hi,
I am trying to populate a combo with the following Where clause. There is something wrong with my code.
Any help appreciated.
Regards,
Alan.
SQL = "SELECT * FROM Customers ORDER bY CompanyName" & "WHERE MailDateSent Is Not Null" & "FollowUpDate Is Null"
Set Customers = DB.OpenRecordset(SQL, dbOpenDynaset)
-
April 1st, 2001, 10:26 PM
#2
Re: That is Null and Is not Null problem
You need to put the ORDER BY Clause last. I think you're query should read:
SQL = "SELECT * FROM Customers WHERE MailDateSent Is Not Null AND FollowUpDate Is Null ORDER bY CompanyName"
Hope this helps,
Nathan Liebke
-
April 1st, 2001, 10:27 PM
#3
Re: That is Null and Is not Null problem
Hi,
The statement should be
sql= "Select * from Customers where MaildateSent is not null and FollowUpDate is null Order by CompanyName"
-
April 2nd, 2001, 08:15 AM
#4
Re: That is Null and Is not Null problem
Try this SQL
SQL = "SELECT * FROM Customers WHERE IsNull(MailDateSent) = False and IsNull(FollowUpDate) = False ORDER bY CompanyName"
Iouri Boutchkine
[email protected]
-
April 2nd, 2001, 02:10 PM
#5
Re: That is Null and Is not Null problem
One last permutation, this should work too...
Select * From Customers Where Not MailDateSent = Null And FollowUpDate = Null
Hope this helps.
Spectre
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|