You are on page 1of 2

select * from znap_invoices_stg where batch_name = 'BATCH_1'

order by status_flag desc


select * from ZAIN_ERR_TABLE
---update znap_invoices_stg set ERROR_MSG = null,STATUS_FLAG = null where batch
_name = 'BATCH_1'
update znap_invoices_stg set status_flag = null, error_msg=null
where batch_name = 'BATCH_1'
update znap_invoices_stg set supplier_name = replace(supplier_name,'amp;','&')
where batch_name = 'BATCH_1'
update znap_invoices_stg set description = replace(description,'amp;','&')
where batch_name = 'BATCH_1'
update znap_invoices_stg set supplier_site = replace(supplier_site,'amp;','&')
where batch_name = 'BATCH_1'
select * FROM ap_invoices_interface where vendor_site_code in (select supplier_s
ite from znap_invoices_stg where batch_name = 'BATCH_1')
--and status = 'REJECTED'

select sum(invoice_amount) FROM ap_invoices_interface where vendor_site_code in


(select supplier_site from znap_invoices_stg where batch_name = 'BATCH_1')
--and status = 'REJECTED'
select * from ap_invoice_lines_interface
select * from ap_invoice_lines_interface where invoice_id in (select invoice_id
from ap_invoices_interface where invoice_num in
(select invoice_num from znap_invoices_stg where batch_name = 'BATCH_1'))
and invoice_line_id > 1169 --creation_date '11/26/2008 10:43:59 PM'
select * from ap_invoices_all where invoice_num in (select invoice_num from znap
_invoices_stg where batch_name = 'BATCH_1')
select * from ap_invoice_lines_all where invoice_id in (select invoice_id from a
p_invoices_interface where invoice_num in
(select invoice_num from znap_invoices_stg where batch_name = 'BATCH_1'))

SELECT CODE_COMBINATION_ID
----INTO ln_code_combi_id
FROM GL_CODE_COMBINATIONS_KFV a
WHERE CONCATENATED_SEGMENTS = '750.0000.667210.0000.0000.000.000'
AND enabled_flag = 'Y'
AND TRUNC(SYSDATE) BETWEEN NVL(START_DATE_ACTIVE,SYSDATE-1) AND NVL(END_DATE_ACT
IVE,SYSDATE+1);
750.0000.667210.0000.0000.000.000

SELECT payment_method_code
----INTO l_pay_method
FROM iby_payment_methods_tl
WHERE UPPER(payment_method_name) = UPPER('Check')
AND LANGUAGE = 'US';

You might also like