SELECT COR_ID_ZONE, COR_SOCIETE, COR_IDSERVICE, COR_CATEGORIE,
COR_DEBUT_DATE_EFFET, COR_VALEUR, COR_ID_OPERATEUR
FROM CORRECTIF
WHERE COR_DEBUT_DATE_EFFET < SYSDATE
AND COR_ID_ZONE = 9
AND COR_SOCIETE = '147'
AND COR_IDSERVICE = '1'
AND COR_CATEGORIE = 'F76'
AND COR_STATUT = 1
AND COR_DEBUT_DATE_EFFET = (
SELECT MAX(COR_DEBUT_DATE_EFFET)
FROM CORRECTIF
WHERE COR_ID_ZONE = 9
AND COR_SOCIETE = '147'
AND COR_IDSERVICE = '1'
AND COR_CATEGORIE = 'F76'
AND COR_STATUT = 1
)
|