Merging 3 Tables into one New Table

Anonymous
2021-03-22T12:59:54.15+00:00

I have one table that has master well data, another that has monthly production data and one that has forecast data. I want to merge them together into a new table. I have attached an Example to show what I am trying to do. Well Data has API, Lease Operator, Production has Production Data, Oil and Gas, Forecast has Monthly Forecast Date Oil and Gas. What I want is to join Master to Production into a new table then when Production stops I want Master to Forecast to start. I have attached an example of the new table I am wanting to insert into. Hopefully this makes sense. I want the Master and Production until Production Stops then Master and Forecast after that combined into a table with Production Date Oil and Gas then Monthly Date Oil and Gas after production stops. Production goes till December 2020 then forecast starts at January 2021 currently but I want Production to take presidence, for example if Production runs till February 2021 and Forecast starts in January 2021 I want Production to run till February 2021 then forecast to start in March 2021. I created a source column so if source is MP then use MP first then use FCST afterwards. Hopefully I explained it correctly. Thanks, [80058-forecast-example.pdf][1] [1]: /api/attachments/80058-forecast-example.pdf?platform=QnA

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
35,948 questions
{count} votes