Hi,
I have table - Ctry_Sales
columns
Country
year
Jansales
Febsales
Marsales
Aprsales --------DecSales
For Current year, when I do the update on sales amount, it should do only for current and future months. Past months should not be changed.
There is tmp_sales, table where calculation is done, and will like below for March 2019
Country----year----JanSales----FebSales-----MarSales---AprSales----MaySales-------DecSales
ABC--------2019------0----------------0--------------5000----------10000--------2000--------------1000
XYZ---------2019------0-------------25000----------10000-------2500--------------------5000
PQR--------2019------0-----------------0--------------1000---------0-------------------------1000
I don't want the zero to be updated to past month, because table Ctry_Sales have the past month data updated by month end process. So it should not be changed during weekly update of current and future months.
I can't change the table structure.
Please any suggestion, will be of great help.
Thanks in advance.