SELECT DISTINCT A.REQUESTOR_ID , C.OPRDEFNDESC , A.PV_PUBLIC_GRP , 'P' FROM PS_PV_REQ_FAVS_GRP A , PS_REQUESTOR_TBL B , PSOPRDEFN C WHERE A.REQUESTOR_ID = B.REQUESTOR_ID AND B.ACTIVE_FLG = 'Y' AND A.REQUESTOR_ID = C.OPRID AND A.PV_SHARE_GRP = 'Y' AND A.PV_PUBLIC_GRP = 'Y' UNION SELECT DISTINCT A.REQUESTOR_ID , C.OPRDEFNDESC , D.ROLENAME , 'R' FROM PS_PV_REQ_FAVS_GRP A , PS_REQUESTOR_TBL B , PSOPRDEFN C , PS_PV_REQ_GRPROLE D WHERE A.REQUESTOR_ID = B.REQUESTOR_ID AND B.ACTIVE_FLG = 'Y' AND A.REQUESTOR_ID = C.OPRID AND A.PV_SHARE_GRP = 'Y' AND D.REQUESTOR_ID = A.REQUESTOR_ID AND D.PV_REQ_FAVS_GRP = A.PV_REQ_FAVS_GRP UNION SELECT DISTINCT A.REQUESTOR_ID , C.OPRDEFNDESC , D.OPRID , 'O' FROM PS_PV_REQ_FAVS_GRP A , PS_REQUESTOR_TBL B , PSOPRDEFN C , PS_PV_REQ_GRPRQSTR D WHERE A.REQUESTOR_ID = B.REQUESTOR_ID AND B.ACTIVE_FLG = 'Y' AND A.REQUESTOR_ID = C.OPRID AND A.PV_SHARE_GRP = 'Y' AND D.REQUESTOR_ID = A.REQUESTOR_ID AND D.PV_REQ_FAVS_GRP = A.PV_REQ_FAVS_GRP
|