[ad_1]
I have a source price table where data is inserted into this table every day even if there is any change or not. I want to load this into a target table using SQL query that will just pull the data when there is actual change and add an end date.
For Store 1, product code 10 there is no change for each day other than the date, so we can just have the 2020-01-01 Record,
For store 1, product code 20 there is a change in price and promotion price on 2020-01-03, so as there is not change in 2020-01-02 that records need not be loaded into the target
For store 2, product code 10 there is a change on 2020-01-05, so the 2020-01-01 record with end date 2020-01-05 needs to be inserted, along with 2020-01-05.
[ad_2]