SELECT DISTINCT A.DISP_TMPL_ID , B.PNLGRPNAME FROM PS_RDT_TMPL_DEFN A , PS_RDT_TMPL_COMP B , PS_RDT_TMPL_OPT C , PS_BUS_UNIT_RC_DEF D WHERE A.DISP_TMPL_ID = B.DISP_TMPL_ID AND B.DISP_TMPL_ID = C.DISP_TMPL_ID AND B.PNLGRPNAME = C.PNLGRPNAME AND B.MARKET = C.MARKET AND A.DISP_TMPL_FAM_CD = D.DISP_TMPL_FAM_CD AND B.PNLGRPNAME = D.PNLGRPNAME AND B.MARKET = D.MARKET AND C.LIC_PROD_CD IN ( SELECT FIELDNAME FROM PSRECFIELD WHERE RECNAME = 'INSTALLATION' AND (FIELDNAME IN ( SELECT 'RC' FROM PS_INSTALLATION WHERE RC = 'Y') OR FIELDNAME IN ( SELECT 'RH' FROM PS_INSTALLATION WHERE RH = 'Y') OR FIELDNAME IN ( SELECT 'RHHR' FROM PS_INSTALLATION WHERE RHHR = 'Y') OR FIELDNAME IN ( SELECT 'RCSS' FROM PS_INSTALLATION WHERE RCSS = 'Y') OR FIELDNAME IN ( SELECT 'RHSS' FROM PS_INSTALLATION WHERE RHSS = 'Y')))
|