Actualy I was mistaken. It covers all Terry's examples but I doesn't cover cases when NET.Start_date = NET.End_date = ldStartCurr or NET.Start_date = NET.End_date = ldEndCurr
>What do you mean Sergey? ldStartPrev,ldEndPrev? You can add it as another condition.
>Cetin
>
>>Cetin,
>>
>>Your condition do not satisfy 2nd, 3rd and 4th examples below.
>>
>>>Didn't check throroughly, just some code to get 'overlapping' in an easier way:
>>>
where NET.Start_date < m.ldEndCurr and NET.End_date > m.ldStartCurr
>>>instead of multiple 'or's.
--sb--