DD.WellWorkover.Cloud/AsbCloudDb/UsefulQueries/Add permission to company for cluster.sql

7 lines
206 B
SQL

insert into t_relation_company_well (id_well, id_company )
Select
t_well.id as id_well,
8 as id_company
from t_well
join t_cluster tc on t_well.id_cluster = tc.id
where tc.caption = 'к85';