Query problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm tgrying to get a query to give me records with 2 criteria. 1st is a range of dates (from ddmmyy to ddmmyy), and the second is IsNull for dates. This is for a vehicle database and I want to show what vehicles of a specific body type are NOT reserved during the dates requested. I know that I may have to write code for this, but I don't know what code or where exactly I should write it at. Any help would be greatly appreciated. Thanks.
 
In the query criteria try
is null or between [date1] and [date2]

Jim
-----Original Message-----
I'm tgrying to get a query to give me records with 2
criteria. 1st is a range of dates (from ddmmyy to ddmmyy),
and the second is IsNull for dates. This is for a vehicle
database and I want to show what vehicles of a specific
body type are NOT reserved during the dates requested. I
know that I may have to write code for this, but I don't
know what code or where exactly I should write it at. Any
help would be greatly appreciated. Thanks.
 
Joe lebrecht said:
I'm tgrying to get a query to give me records with 2 criteria. 1st is a
range of dates (from ddmmyy to ddmmyy), and the second is IsNull for dates.
This is for a vehicle database and I want to show what vehicles of a
specific body type are NOT reserved during the dates requested. I know that
I may have to write code for this, but I don't know what code or where
exactly I should write it at. Any help would be greatly appreciated. Thanks.

Joe,

If you test for BETWEEN and IS NULL at the same time on the same column,
the IS NULL will negate the BETWEEN, returning 0 rows, so I'm hoping this
would be tests against different columns.

Otherwise, try:

SELECT M1.MyColumn1
FROM MyTable1 AS M1
WHERE (M1.PromisedShippingDate BETWEEN #01/01/04# AND #01/31/04#)
AND (M1.ShippedDate IS NULL)


Sincerely,

Chris O.
 
Back
Top