SELECT JPM_JP_TYPE , DESCR FROM PS_JPM_JP_TYPES A WHERE A.JPM_PROFILE_USAGE IN ('J','P') AND A.JPM_JP_TYPE_STATUS = 'A' AND %EffdtCheck(JPM_JP_TYPES A1, A, %CurrentDateIn) AND EXISTS ( SELECT 'X' FROM PS_JPM_JP_PROPS B WHERE B.JPM_JP_TYPE = A.JPM_JP_TYPE AND %EffdtCheck(JPM_JP_PROPS B1, B, %CurrentDateIn) AND B.JPM_SRCH_FLG = 'Y') AND EXISTS ( SELECT 'X' FROM PS_JPM_JP_TYP_PIDS C WHERE C.JPM_JP_TYPE = A.JPM_JP_TYPE AND %EffdtCheck(JPM_JP_TYP_PIDS C1, C, %CurrentDateIn) AND C.JPM_JP_END_PROFILE = 'Y') UNION SELECT FIELDVALUE , XLATLONGNAME FROM PSXLATITEM X WHERE FIELDNAME = 'JPM_SRCH_ALL' AND FIELDVALUE = '0000' AND %EffdtCheck(PSXLATITEM X1, X, %CurrentDateIn)
|