miércoles, 16 de abril de 2014

Query para obtener errores de interface de Estados Bancarios


SELECT CSHIA.STATEMENT_NUMBER fecha_estado,
       CSHIA.BANK_ACCOUNT_NUM cuenta_bancaria,
       CHIE.MESSAGE_NAME error_cabecera,
       CSLI.LINE_NUMBER  nro_linea,
       CLIE.MESSAGE_NAME error_linea
  FROM   CE_STATEMENT_HEADERS_INT_ALL CSHIA
  LEFT OUTER JOIN CE_STATEMENT_LINES_INTERFACE CSLI
   ON CSLI.STATEMENT_NUMBER =  CSHIA.STATEMENT_NUMBER
  LEFT OUTER JOIN CE_HEADER_INTERFACE_ERRORS CHIE
  ON CHIE.STATEMENT_NUMBER =  CSHIA.STATEMENT_NUMBER
  LEFT OUTER JOIN CE_LINE_INTERFACE_ERRORS CLIE
  ON CLIE.STATEMENT_NUMBER = CHIE.STATEMENT_NUMBER
   AND  CLIE.LINE_NUMBER = CSLI.LINE_NUMBER
 WHERE CSHIA.BANK_ACCOUNT_NUM='&BANK_ACCOUNT'
 AND  CSHIA.STATEMENT_NUMBER ='&STATEMENT_NUMBER'

No hay comentarios:

Publicar un comentario