I am using SSMS 2018. I need to take a production Table and Merge it to a forecast Table and insert into a new table called Forecast using a stored procedure. So if my last production for a well is 10/2021 I want to merge it to my forecast table starting in 11/2021 forward and insert that into a new table. I created a New table called Production_Forecast
My Forecast Table has this
API
Well
Lease
Operator
Basin
P_Date
Oil
Gas
My Forecast Table has
API
Well
Lease
Operator
Basin
Outdate
Gross_Oil
Gas_Gas
I have tried Merge and insert into but it is not working right I want Production first and Forecast only after production stops. Is there an easy way to do this?