simplistically in SQL

SELECT date,event
FROM events
WHERE date BETWEEN '1/14/2004' AND '2/16/2004'

-----Original Message-----
From: C. Hatton Humphrey [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 29, 2004 10:33 AM
To: CF-Talk
Subject: Calendar query?

Does anyone know of a way to create a query with a range of dates and any
matching records that might match in a database in one query?  For example,
if I'm looking at a table that has the following:

ID | Date       | Event
---+------------+-------------------
1 | 01/01/2004 | New Years Day
2 | 02/14/2004 | Valentine's Day
3 | 01/26/2004 | Mom's Birthday
4 | 02/04/2004 | Doctor's Appointment

Say I wanted to show all of the days between 01/15/2004 and 02/15/2004 along
with any matching events in the database.  Is there a way to do this with
one query?  So far the only two ways that I can see doing it otherwise is to
loop through the date range and perform individual queries... Which IMO is a
little inefficient.

Any ideas?

Thanks!
Hatton

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.572 / Virus Database: 362 - Release Date: 1/27/2004
  _____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to