Dejo las consultas para que la miren:
Código SQL:
Ver original
--obtenerItemsCuotasNCOracle SELECT credit_reason, credit_entry_type, amount, ( SELECT invoice FROM tickets t WHERE invoice =:fac AND bussinesdate =:fecha AND t.ticket_date <=:hora ), substr(credit_invoice,POSITION('-' IN credit_invoice)+1), business_unit, credit_invoice FROM ticketitems WHERE ticket_key =:tique AND credit_reason = 'INTER' AND credit_invoice =:credit
Código SQL:
Ver original
--obtenerItemsCuotasNCPostgres SELECT credit_reason, credit_entry_type, amount, ( SELECT invoice FROM tickets t WHERE invoice =:fac AND bussinesdate =:fecha AND t.ticket_date <=:hora ), substr(credit_invoice,POSITION('-' IN credit_invoice)+1), business_unit, credit_invoice FROM ticketitems WHERE ticket_key =:tique AND credit_reason = 'INTER' AND credit_invoice =:credit