I have two tables. Let's say Table A and Table B. Table A contains purchases for several ids, date-wise(There could be more than 1 record for each Id on a particular day). This table contains data for say 6 days(10th-15th september), and I have other table B which contains data for 3 days(14th,15th,16th september). Now, I want to update my Table A in such a way that It should contain new data from Table B(i.e of date 16th September) and also update the values for date 14th,15th for each ID in table A from Table B(considering that Table B contains updated values for 14th, 15th)