SELECT DISTINCT G.Oprid , A.scc_letter_cd , A.Descr FROM PS_SCC_STN_LTR_TBL A , PS_COMM_CTXT_TBL B , PS_COMM_CTX_ME_TBL C , PS_COMM_CATG_TBL D , PS_COMM_CA_CTX_TBL E , PS_COMM_GRP_3C_TBL F , PS_OPR_GRP_3C_TBL G WHERE A.scc_letter_cd = C.scc_letter_cd AND B.Institution = C.Institution AND B.Comm_Context = C.Comm_Context AND B.Comm_Context = E.Comm_Context AND C.EffDT = B.EffDT AND B.EffDT = ( SELECT MAX(Z.EffDT) FROM PS_COMM_CTXT_TBL Z WHERE D.Institution = Z.Institution AND B.Comm_Context = Z.Comm_Context AND Z.EffDT <= D.EffDT) AND B.Eff_Status = 'A' AND B.Institution = D.Institution AND D.Institution = E.Institution AND D.EffDT = E.EffDT AND D.EffDT = ( SELECT MAX(Y.EffDT) FROM PS_COMM_CATG_TBL Y WHERE D.Institution = Y.Institution AND D.Comm_Category = Y.Comm_Category AND Y.EffDT <= %CurrentDateIn) AND D.Eff_Status = 'A' AND D.Comm_Category = E.Comm_Category AND F.Comm_Category = D.Comm_Category AND F.Institution = B.Institution AND F.Group_3C = G.Group_3C AND B.Institution = G.Institution AND G.Entry_Use_Ind = 'Y' AND A.SCC_CG_PARMS = 'Y'
|