Wednesday, January 25, 2017

SQL Query to find " What query TREE(s) and ACESS GROUP(s) does this record currently belong? - PS Query Security


What query TREE(s) and ACCESS GROUP(s) does this record currently belong?



SELECT A.TREE_NAME, TO_CHAR(A.EFFDT,'YYYY-MM-DD'), A.EFF_STATUS, A.DESCR, TO_CHAR(A.LASTUPDDTTM,'YYYY-MM-DD-HH24.MI.SS."000000"'), A.LASTUPDOPRID, B.PARENT_NODE_NAME, B.TREE_NODE, B.TREE_NODE_TYPE, B.TREE_NODE_NUM, B.PARENT_NODE_NUM,A.SETID,A.SETCNTRLVALUE
FROM PSTREEDEFN A, PSTREENODE B
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
ORDER BY 1, 11

No comments:

Post a Comment