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
In reply to Overlapping dates Issue by data67
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |