问题描述
- merge insert select问题
-
MERGE INTO yn_netcut.his_rms_bts_in_net A
USING ( SELECT A.FLOW_NO,B.ACTIVITYDEFID,B.WORKITEMNAME FROM yn_netcut.t_bpm_form_info A,yn_netcut.wfworkitem B WHERE A.PROC_INS_ID=B.PROCESSINSTID
AND A.Flow_Model='com.inspur.app.btsInNetNew.process.btsInNet')B
ON(A.Apply_Id=B.FLOW_NO AND A.STEP_ID=B.ACTIVITYDEFID)
WHEN NOT MATCHED THEN
INSERT(his_int_id, int_id, standard_name, zone_id, city_id, related_site,
equiproom_id, longitude, latitude, altitude, vendor_id, equipment_model, fre_band, trx_num,
cell_num,
village_flag, bts_sort, btscover_type, coverage_type, is_net, address, bts_no, related_bsc, cells_type,
trans_type, inuse_date, contingency_type, op_vendor, repair_vendor, softwareversion,
powershare_flag,
permanent_assets_no, portect_type, stateflag, modify_by, modify_date, create_by, create_date, apply_id,
step_id, buider, zone_name, city_name, vendor_name, related_site_name,
equiproom_name, related_bsc_name
)VALUES(SELECT seq_eomsirms_info.nextval,int_id, standard_name, zone_id, city_id, related_site,
equiproom_id, longitude, latitude, altitude, vendor_id, equipment_model, fre_band, trx_num,
cell_num,
village_flag, bts_sort, btscover_type, coverage_type, is_net, address, bts_no, related_bsc, cells_type,
trans_type, inuse_date, contingency_type, op_vendor, repair_vendor, softwareversion,
powershare_flag,
permanent_assets_no, portect_type, stateflag, modify_by, modify_date, create_by, create_date, apply_id,
B.ACTIVITYDEFID, buider, zone_name, city_name, vendor_name, related_site_name,
equiproom_name, related_bsc_name FROM yn_netcut.his_rms_bts_in_net WHERE Step_Id='optimize')
解决方案
大家帮我看看 这个sql怎么改造能不报错
时间: 2024-09-20 20:16:30