This should be pretty close to what you need, if I understand your situation:
Select * From mytable Where (querydate1 > tabledatelow And querydate1 < tabledatehigh) And (querydate2 > tabledatelow And querydate2 < tabledatehigh); I'm assuming you know which of the two dates in the table is the lower or bottom end of the interval (called tabledatelow above) and which is the later, higher, top end of the interval. If not, you'll have to use some min() and max() functions to pick the ends of the interval correctly. ----- Original Message ----- From: "Bruno Grampa" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, October 05, 2001 5:34 AM Subject: Date interval problem Hello, i have a table with two dates, that define an interval. In the query i have two more dates, and i want to select all the records that overlap that period. Any hint to solve this problem? Thanks, Bruno --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php