SELECT A.ALIAS_NAME , D.MENUNAME , D.BARNAME , D.ITEMNAME , C.ITEMNAME , A.PA_KEYVALUE , A.PA_KEYFIELD , B.LBLTEXT , D.ITEMLABEL , E.SEARCHRECNAME FROM PS_PA_ALIAS_XREF A , PSPNLFIELD B , PSPNLGROUP C , PSPNLGRPDEFN E , PSMENUITEM D WHERE A.PA_USEREC = B.RECNAME AND C.PNLNAME= B.PNLNAME AND C.PNLGRPNAME = D.PNLGRPNAME AND E.PNLGRPNAME = C.PNLGRPNAME AND A.PA_USEFIELD = B.FIELDNAME AND ((A.PA_USEREC <> 'PA_CUSTOM2') OR (A.PA_USEREC = 'PA_CUSTOM2' AND (C.PNLGRPNAME = 'PLAN_ELIGIBILITY' AND 'P' = ( SELECT CUSTOM_TYPE FROM PS_PA_CUSTOM WHERE CUSTOM_STMT_NAME = A.PA_KEYVALUE)) OR (C.PNLGRPNAME = 'CUSTOM_STATMENT' AND 'C' = ( SELECT CUSTOM_TYPE FROM PS_PA_CUSTOM WHERE CUSTOM_STMT_NAME = A.PA_KEYVALUE)) OR (C.PNLGRPNAME = 'GROUP_DEFINITION' AND 'G' = ( SELECT CUSTOM_TYPE FROM PS_PA_CUSTOM WHERE CUSTOM_STMT_NAME = A.PA_KEYVALUE)) OR (C.PNLGRPNAME = 'BENEFIT_FORMULA' AND 'B' = ( SELECT CUSTOM_TYPE FROM PS_PA_CUSTOM WHERE CUSTOM_STMT_NAME = A.PA_KEYVALUE)) OR (C.PNLGRPNAME = 'STATUS_CODE_DEFINT' AND 'S' = ( SELECT CUSTOM_TYPE FROM PS_PA_CUSTOM WHERE CUSTOM_STMT_NAME = A.PA_KEYVALUE)) OR (C.PNLGRPNAME = 'SPOUSE_ELIGIBILITY' AND 'E' = ( SELECT CUSTOM_TYPE FROM PS_PA_CUSTOM WHERE CUSTOM_STMT_NAME = A.PA_KEYVALUE))))
|