Posts

Showing posts with the label Query Security Tree

PS Query Security Tree

--SQL will show the Query Security Tree Name and Permission it is associated with for a specific Table Name. SELECT A.TREE_NAME, A.DESCR, B.PARENT_NODE_NAME, B.TREE_NODE, B.TREE_NODE_TYPE, C.CLASSID, B.TREE_NODE_NUM, B.PARENT_NODE_NUM, C.ACCESS_GROUP, C.ACCESSIBLE FROM PSTREEDEFN A, PSTREENODE B, PS_SCRTY_ACC_GRP C WHERE ( A.SETID = ' ' AND A.TREE_STRCT_ID = 'ACCESS_GROUP' AND A.SETID = B.SETID AND A.SETCNTRLVALUE = B.SETCNTRLVALUE AND A.TREE_NAME = B.TREE_NAME AND B.TREE_NODE = :1 AND B.TREE_NAME = C.TREE_NAME ) ORDER BY 7, 8, 6 ; --Below SQL will give the List of Queries that is exist in the system, but some of the Records used in Query in not available in the Query Security Tree SELECT A.QRYNAME, A.DESCR   FROM PSQRYDEFN A, PSQRYRECORD B   WHERE ( A.OPRID = B.OPRID      AND A.QRYNAME = B.QRYNAME      AND NOT EXISTS (SELECT 'X'   FROM PSTREEDEFN C, PSTREENODE D   WHERE C.EFFDT =       ...