Query for getting list of records from access group and tree
SELECT
R.TREE_NAME, G1.TREE_NODE,G.TREE_NODE,R.TREE_NODE FROM pstreenode
R, pstreenode G ,(SELECT
TREE_NAME,TREE_NODE,TREE_NODE_TYPE FROM pstreenode WHERE TREE_NODE_TYPE = 'G' )
G1
WHERE
R.TREE_NODE_TYPE = 'R'
AND
G.TREE_NODE_TYPE = 'G'
AND
R.PARENT_NODE_NAME = G.TREE_NODE
AND
G.tree_name = 'QUERY_TREE_AM'
AND
R.TREE_NAME = G.TREE_NAME
AND
G.PARENT_NODE_NAME = G1.TREE_NODE (+)
AND
G.TREE_NAME =
G1.TREE_NAME (+)
ORDER BY
1,2 ;
No comments:
Post a Comment