How to insert data based on Effective date change in Table
I am having the below Columns
EmpId, Effdt, EffSequence, Action, Action_Reason, Role, Designation, SupervisorID, Location
For Example: 1 Employee having data for the Dates like
20th June 2020, 21st June 2020, 24th June 2020, 26th June 2020.
There are no fixed dates. Multiple rows data are available.
If the user enters the data from Frontend for the Date 19th June 2020 then need to insert the data with EffSequence Zero and New row for 26th June 2020 with EffSequence increment of 1 for 26th June 2020
If the user enters the data from frontend for the Date 20th June 2020 then need to check the EffSequence for the 20th June 2020 plus 1 for 20th June 2020 new row and new row for 26th June 2020 with EffSequence increment of 1 for 26th June 2020