> Jerry, > Althought "overlaps" is a reserved word in sql, the > operand is not > implemented. I'm looking for an equivelant now.
Here's a place where Jochem provided a little more info about it: http://archives.postgresql.org/pgsql-hackers/2005-05/msg01453.php :) I didn't know about it... if it doesn't work, with any given database, however, it appears to just be a shortcut way of writing where a.startdate < b.enddate and a.enddate >= b.startdate which is the nearly identical to what I posted - the only difference is that with overlaps you'll get false if the startdate of a is exactly the same as the enddate of b... (that is, they sed < instead of <=). good to know it's there tho... I imagine it's easier for a lot of folks to use... > -----Original Message----- > From: Jerry Johnson [mailto:[EMAIL PROTECTED] > Sent: Friday, August 05, 2005 9:11 AM > To: CF-Talk > Subject: Re: What would be the easiest way to write this > query? > Does this work on SQL Server 2000? > On 8/5/05, Jochem van Dieten <[EMAIL PROTECTED]> > wrote: >> The following query will return all overlapping >> promotions: >> SELECT * >> FROM table >> WHERE (#FORM.PStartDate#, #FORM.PEndDate#) OVERLAPS >> (promotionEnd, promotionStart) s. isaac dealey 954.522.6080 new epoch : isn't it time for a change? add features without fixtures with the onTap open source framework http://www.fusiontap.com http://coldfusion.sys-con.com/author/4806Dealey.htm ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:213858 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54