My db structure:
Empcode fromdate todate.
ec01 01-18-2012 01-23-2012
ec01 01-24-2012 03-28-2012
There may be several records for the same employee in the table..
if i select the date from jan 19 to 27th march..
This should not allow me to insert the record.. because already this employee has applied leave from 18 th jan to 23 jan and this has been approved by the approver..
Again he is deciding to take leave from 24th jan to 28th march.. This also has been approved by the approver..
Again he is trying to give 19th jan to 27th march..
This date lies between the dates which is exisiting on the database...
So, i have to restrict by setting the validation..
How can i check whether the given date lies between these dates...
I got if the date lies between the same month..
But i didnt get whether the given date lies between different months..
Thanks in advance.