How to get all dates between two dates.

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

Guest

Hi,
I want to get all Orders from say, 12/1/2004 to 12/31/2004, if there
are no records for a date, I want to include that date too showing 0 shops.
I guess I can do this using a Left Outer Join on a table with all the
dates. But how do I get all the dates using a query.

Any help is appreciated,
Debi
 
Debi said:
Hi,
I want to get all Orders from say, 12/1/2004 to 12/31/2004, if there
are no records for a date, I want to include that date too showing 0
shops.
I guess I can do this using a Left Outer Join on a table with all the
dates. But how do I get all the dates using a query.

You can't get records that aren't there. Unless you have records for those
dates
whose value is 0 shops, you won't get any records returned from a query for
those dates.

If you DO have 0 valued records, then a criterion of Between #date1# And
#date2# will work.

Tom Lake
 
Back
Top