41: -- table to get the status of the previous operation,
42: -- if any, to help set the RETRY flag
43: SELECT count(*)
44: INTO num_trxns
45: FROM iby_batches_all
46: WHERE BatchID = order_id_in;
47: IF (num_trxns > 0)
48: THEN
49: SELECT BatchStatus
47: IF (num_trxns > 0)
48: THEN
49: SELECT BatchStatus
50: INTO status_out
51: FROM iby_batches_all
52: WHERE BatchID = order_id_in;
53: END IF;
54: ELSIF ((UPPER(payment_operation_in) <> 'ORASET_QRYBATCHSTATUS') AND
55: (UPPER(payment_operation_in) <> 'ORASET_TRXNSTATUSQUERY'))