SELECT A.CRSPD_SETID , A.CRSPD_CUST_ID , A.ST_ID_NUM ,A.ST_DT , B.NAME1 , B.OPRID FROM PS_EB_STMT_CUST A , PS_EB_CNT_CUST_VW B ,PS_EB_INV_DISP_OPT C WHERE( A.CRSPD_SETID = B.SETID AND A.CRSPD_CUST_ID = B.CUST_ID AND C.OPRID = B.OPRID AND C.NEW_STATEMENT_FLG = 'Y' AND C.EB_NOTIFY_METHOD = 'P' ) UNION SELECT DISTINCT A.CRSPD_SETID , A.CRSPD_CUST_ID , A.ST_ID_NUM ,A.ST_DT , B.NAME1 , B.OPRID FROM PS_EB_STMT_CUST A , PS_EB_CNT_CUST_VW B WHERE( A.CRSPD_SETID = B.SETID AND A.CRSPD_CUST_ID = B.CUST_ID AND B.OPRID NOT IN ( SELECT C.OPRID FROM PS_EB_INV_DISP_OPT C WHERE C.EB_NOTIFY_METHOD IN ('E','P')) AND EXISTS ( SELECT 'X' FROM PS_INSTALLATION_EB D WHERE D.DFLT_DLVRY_FLG = 'P' ))
|