SELECT A.GRIEVANCE_ID , E.LANGUAGE_CD , B.DESCRSHORT , E.CONTRACT_REF , E.DESCRLONG , B.DESCRSHORT , D.DESCR , F.COMMENTS FROM PS_GRIEVANCE A , PS_GRIEV_TYPE_LANG B , PS_GRIEVANCE_STEP C , PS_GRIEV_STEP_LANG D , PS_GRIEV_LNG E , PS_GRIEV_STEP_LNG F WHERE A.GRIEVANCE_TYPE = B.GRIEVANCE_TYPE AND A.GRIEVANCE_ID = C.GRIEVANCE_ID AND A.GRIEVANCE_ID = E.GRIEVANCE_ID AND C.GRIEVANCE_STEP = D.GRIEVANCE_STEP AND C.GRIEVANCE_ID = F.GRIEVANCE_ID AND C.GRIEVANCE_STEP = F.GRIEVANCE_STEP AND B.LANGUAGE_CD = D.LANGUAGE_CD AND D.LANGUAGE_CD = E.LANGUAGE_CD AND E.LANGUAGE_CD=F.LANGUAGE_CD AND B.EFFDT = ( SELECT MAX(B1.EFFDT) FROM PS_GRIEV_TYPE_LANG B1 WHERE B.GRIEVANCE_TYPE=B1.GRIEVANCE_TYPE AND B1.EFFDT <= A.GRIEVANCE_DT) AND D.EFFDT = ( SELECT MAX(D1.EFFDT) FROM PS_GRIEV_STEP_LANG D1 WHERE D.GRIEVANCE_STEP=D1.GRIEVANCE_STEP AND D1.EFFDT <= A.GRIEVANCE_DT)
|