Hi Experts,
I have 2 tables called 1. Req and 2.Req_hist
I have a data in Req table like below
Req Table:
Req_no, Req_status, last_modified_date
1,New,2019-06-23
Req_hist table:
Req_no,Req_status,last_modified_date
1. How to load history records into Req_hist table based on Req table.
2. Whenever status changes happened in req table values should be appended in Req_hist table with the updated value.
For example:
Req Table:
Req_no, Req_status, last_modified_date
1, Offersent , 2019-06-25
Req_hist table:
Req_no,Req_status,last_modified_date
1, New, 2019-06-23
1, Offersent , 2019-06-25
How we have to write a query to handle this type of scenario.
Kindly help on this.
Thanks in Advance
Visu