-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathBIMRL_graphview.sql
13 lines (12 loc) · 992 Bytes
/
BIMRL_graphview.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
// Create Circulation grapn view
CREATE OR REPLACE VIEW CIRCULATION_&1 AS
SELECT A.LINK_ID, A.LINK_NAME, A.LINK_TYPE, A.ACTIVE, A.LINK_LEVEL, A.PARENT_LINK_ID,
A.START_NODE_ID, B.NODE_NAME START_NODE_NAME, B.NODE_TYPE START_NODE_TYPE, B.ACTIVE START_NODE_ACTIVE,
B.HIERARCHY_LEVEL START_HIERARCHY_LEVEL, B.PARENT_NODE_ID START_PARENT_ID,
A.END_NODE_ID, C.NODE_NAME END_NODE_NAME, C.NODE_TYPE END_NODE_TYPE, C.ACTIVE END_NODE_ACTIVE,
C.HIERARCHY_LEVEL END_HIERARCHY_LEVEL, C.PARENT_NODE_ID END_PARENT_ID,
D.NAME STARTELEMNAME, D.LONGNAME STARTELEMLNAME, D.OBJECTTYPE STARTELEMOBJECTTYPE,
E.NAME ENDELEMNAME, E.LONGNAME ENDELEMLNAME, E.OBJECTTYPE ENDELEMOBJECTTYPE
FROM CIRCULATION_&1_LINK$ A, CIRCULATION_&1_NODE$ B, CIRCULATION_&1_NODE$ C, BIMRL_ELEMENT_&1 D, BIMRL_ELEMENT_&1 E
WHERE B.NODE_ID = A.START_NODE_ID AND C.NODE_ID = A.END_NODE_ID AND D.ELEMENTID = B.NODE_NAME AND E.ELEMENTID = C.NODE_NAME;
GRANT SELECT,UPDATE,INSERT,DELETE on CIRCULATION_&1 TO PUBLIC;