You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ws/fct/ws_gw_fct_pg2epa_nod2arc.sql
+11-7Lines changed: 11 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -62,22 +62,26 @@ BEGIN
62
62
UNION ALL SELECT node_2 FROM v_edit_arc) a using (node_id) group by n.node_id';
63
63
64
64
-- query text for mandatory node2arcs
65
-
v_querytext ='SELECT a.*, man_valve.to_arc FROM temp_t_node a JOIN man_valve ON a.node_id=man_valve.node_id WHERE to_arc is not null
65
+
v_querytext ='SELECT a.*, v.to_arc FROM temp_t_node a JOIN man_valve v ON a.node_id=v.node_id JOIN inp_valve i ON i.node_id = v.node_id WHERE to_arc is not null
66
66
UNION
67
-
SELECT a.*, man_pump.to_arc FROM temp_t_node a JOIN man_pump ON a.node_id=man_pump.node_id WHERE to_arc is not null';
67
+
SELECT a.*, m.to_arc FROM temp_t_node a JOIN man_pump m ON a.node_id=m.node_id JOIN inp_pump i ON i.node_id=m.node_id WHERE to_arc is not null';
FROM ( ',v_querytext, ' ) b JOIN ( ',v_query_number,' ) c USING (node_id)');
73
75
EXECUTE v_querytext;
74
76
75
77
-- query text for non-mandatory node2arcs
76
78
IF p_only_mandatory_nodarc IS FALSE THEN
77
-
v_querytext ='SELECT a.*, s.to_arc FROM temp_t_node a JOIN man_valve s ON a.node_id=s.node_id WHERE s.to_arc IS NULL';
79
+
v_querytext ='SELECT a.*, s.to_arc FROM temp_t_node a JOIN man_valve s ON a.node_id=s.node_id JOIN inp_shortpipe i ON i.node_id = s.node_id WHERE s.to_arc IS NULL';
0 commit comments