Hi Friends,
I have input file like given below
key, eff-date, term-date
KEY1 20010101 20101231
KEY1 20090303 20101231
KEY2 20090101 20111231
KEY2 20090301 20091231
KEY3 20090303 20101231
KEY4 20090101 20091231
KEY4 20110101 20191231
I want the output like given below as I have to identify the overlapping date ranges and if any such records found then I have to replace minimum eff date and max term date long with overlapping flag 'Y" at end.
KEY1 20010101 20101231 Y
KEY2 20090101 20111231 Y
KEY3 20090303 20101231
KEY4 20090101 20091231
KEY4 20110101 20191231
Please help me on this requirement.