DO - DO Asset Name sync to Well Completion Script
The following script will synchronize the DO Asset Name to align with the Well Completion name. The DO Asset Name is not configurable within the application, and at times, they may become out of sync.
📘 Instructions
Run the below SQL Script
CODE
update upstream_division_order_assets
set name = m.name
--select doa.name "DO Asset Name" , m.name as "Meter Name"
from upstream_division_order_assets doa
join meters m
on m.anchor_id = doa.meter_anchor_id
where
doa.name <> m.name
and m.type = 'WellCompletion'
and m.to_date = '9999-12-31'