The Question:
Does anyone know the proper way to test for a NON-empty date field in the database and/or an Empty date field in a sql query statement?
The Problem:
I have a database that contains several fields, 3 of which are date fields. 1 is when the work request was submitted, 1 is when the work request was assigned to a technician, and the last one is when the work request was completed. I'll call them submitted, open and closed fields.
The problem is when the form tries to send a query that will pull all open record fields that have a value in them (meaning a technician has been assigned to the work request), but do not have a value in the closed field (meaning the work request is still in progress). I'm using somthing like the following:
Select * From tblWorkRequest WHERE (dateOpened <> ""
AND (dateClosed = ""
;
Now, since they are date fields, the quotes won't work because they are for strings. I tried substituting "" with ##, but it still doesn't work.
So, the question is, does anyone know the proper way to test for a non-empty date field, or an empty date field in a sql query statement?
-Ovatvvon :-Q
Does anyone know the proper way to test for a NON-empty date field in the database and/or an Empty date field in a sql query statement?
The Problem:
I have a database that contains several fields, 3 of which are date fields. 1 is when the work request was submitted, 1 is when the work request was assigned to a technician, and the last one is when the work request was completed. I'll call them submitted, open and closed fields.
The problem is when the form tries to send a query that will pull all open record fields that have a value in them (meaning a technician has been assigned to the work request), but do not have a value in the closed field (meaning the work request is still in progress). I'm using somthing like the following:
Select * From tblWorkRequest WHERE (dateOpened <> ""
Now, since they are date fields, the quotes won't work because they are for strings. I tried substituting "" with ##, but it still doesn't work.
So, the question is, does anyone know the proper way to test for a non-empty date field, or an empty date field in a sql query statement?
-Ovatvvon :-Q