Consciente - processo a mais de 2 meses

PHOTO EMBED

Tue Oct 10 2023 20:26:35 GMT+0000 (Coordinated Universal Time)

Saved by @hallancma #apex #javascript

SELECT C.CON_IN_CODIGO,     
       (SELECT MAX(FA.PFA_DT_INICIAL)
          FROM GLO_PROCESSO_FLUXO_ANDA FA
         INNER JOIN GLO_PROCESSO_FLUXO FL
            ON FA.PFLU_IN_CODIGO = FL.PFLU_IN_CODIGO
           AND FL.PFLU_CHAVE_PK = C.CON_IN_CODIGO
           AND FL.PFLU_NOMETABELA = 'RH_FORM_CONTRATACAO') DATA_MOV
  FROM RH_FORM_CONTRATACAO C  
 WHERE UPPER(c.CON_ST_STATUS) NOT IN('FINALIZADO','CANCELADO')
 and (SELECT MAX(FA.PFA_DT_INICIAL)
          FROM GLO_PROCESSO_FLUXO_ANDA FA
         INNER JOIN GLO_PROCESSO_FLUXO FL
            ON FA.PFLU_IN_CODIGO = FL.PFLU_IN_CODIGO
           AND FL.PFLU_CHAVE_PK = C.CON_IN_CODIGO
           AND FL.PFLU_NOMETABELA = 'RH_FORM_CONTRATACAO') < ADD_MONTHS(SYSDATE,-2);
           
content_copyCOPY