Re: MySQL and dates puzzle

2005-10-28 Thread Michael McFadden
Sean, you definately got me :) Your solution is simpler and much more elegant! Had the visual aids here on paper, but I'm not as good with the ascii art as you. I definately learned something! Thanks! -Mike --- [EMAIL PROTECTED] wrote: > Mike, you did a wonderful job at analysis > (identifyin

Re: MySQL and dates puzzle

2005-10-28 Thread SGreen
Mike, you did a wonderful job at analysis (identifying the 6 cases) but I think a series of visual clues would have made a simpler query more obvious. Here's how I understand the issue (I am a more visual thinker) Start with the case of needing to see if a new record (NR) overlaps with an exis

Re: MySQL and dates puzzle

2005-10-27 Thread Michael McFadden
Hi C.F. I'm new to the list, so please excuse me if I'm answering out-of-turn from the pro's here. I think the answer is to also check if the BusyTime_start is between start and end of the attempted scheduled. ie: WHERE (TAID = 1) AND (('2005-10-27 17:30' BETWEEN starts AND ends) OR ('2005-10