data67 has asked for the wisdom of the Perl Monks concerning the following question:
I know some people will suggest "Date::Calc" etc but i wanted to somehow just do this check in my sql call and save time (instead of reading each row and running a date::calc on it). how can i do this? is there a simpler way to do a range check? (maybe with SQL and/or/between? I think between wont work because i have to check 2 dates against 2 params in my program? i donno?)
I want to check that there is no overlapping row in the table where the effective date & expiration date overlap. think of this like a scheduling system where i cant book an appointment over another. here is what my table look like:
Table: Company_relationship company_number relationship_type effective_date expiration_date
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Overlapping dates Issue
by ikegami (Patriarch) on Mar 20, 2006 at 22:43 UTC | |
by data67 (Monk) on Mar 22, 2006 at 17:11 UTC |