Well...  if you were given a start date of 2003-01-01 and end date of
2003-01-31...

select *
  from table_name
 where start_date between "2003-01-01" and "2003-01-31"
    or end_date   between "2003-01-01" and "2003-01-31"

No?

Matt.

On Wed, 2003-04-02 at 16:32, Sarah Heffron wrote:
> How would I do this:
> 
> I have a date range (start date and end date) supplied by the user 
> and I also have information in a table that has start dates and 
> end dates. I want to select everything in the table whose date range 
> overlaps in any way with the date range given by the user. 
> 
> 
> Thanks,
> Sarah
> 
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Tax Center - File online, calculators, forms, and more
> http://tax.yahoo.com
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to