I have requirement of creating CUSTOMER TENURE HISTORY table where we have add records based on customer contract
below is the example for 1 customer having 3 contracts:
First Contract start date/end date: 28/11/2014 to 08/01/2015
Second Contract start date/end date: 08/01/2015 to 09/02/2015
Third Contract start date/end date: 10/02/2015 to now
In Tenure History we don't need to add new record for each contract, we have to add record only if non-contiguous( i.e next contract start date >1 day after the previous contract end date, so if the difference is less than one then we should have only one tenure history record.
so using this logic above customer should have only one records in tenure history:
28/11/2014 to now
My problem is, all these three records are in the source table, and I have to use condition to check start date and end date of current and previous records, how to implement this as dynamic cache feature is available only in table comparison and there we not use any condition.
I have tried to use option Rows per commit by giving value 1, so that I can compare records with target table with each committed row. but it is not working and commit all rows at once.
Please suggest any approach to solve this problem.
Thanks in advance for help and support