select *
from ja_in_receipt_tax_lines jtl, rcv_shipment_lines rcl,
rcv_shipment_headers rch
where rch.receipt_num like '200604211'
and jtl.tax_type in ('Service')
and rcl.shipment_line_id = jtl.shipment_line_id
and rcl.shipment_header_id = rch.shipment_header_id
-----------------------------------------------------------------------
SELECT /*+INDEX (RSH RCV_SHIPMENT_HEADERS_U1) INDEX (GCCK GL_CODE_COMBINATIONS_U1)*/
rsh.receipt_num, rt.transaction_type, NULL account_type,
gcck.concatenated_segments, rrsl.accounted_cr, rrsl.accounted_dr,
rrsl.currency_code, ood.organization_code organization_code,
rrsl.accounting_date gl_date
FROM rcv_receiving_sub_ledger rrsl,
rcv_transactions rt,
rcv_shipment_headers rsh,
gl_code_combinations_kfv gcck,
org_organization_definitions ood
WHERE rrsl.rcv_transaction_id = rt.transaction_id(+)
AND rt.shipment_header_id = rsh.shipment_header_id(+)
AND rrsl.code_combination_id = gcck.code_combination_id(+)
AND rsh.organization_id = ood.organization_id(+)
AND rsh.receipt_num in ('200500915','200502972','200600332','200703754','200805644','200900262')
UNION
SELECT jirjb.receipt_num, jirjb.acct_nature, jirjb.acct_type,
gcck.concatenated_segments, jirjb.entered_cr, jirjb.entered_dr,
jirjb.currency_code, ood.organization_code organization_code,
jirjb.transaction_date gl_date
FROM ja_in_rcv_journals_b jirjb,
gl_code_combinations_kfv gcck,
org_organization_definitions ood
WHERE jirjb.code_combination_id = gcck.code_combination_id(+)
AND jirjb.organization_code = ood.organization_code(+)
AND jirjb.receipt_num in ('200500915','200502972','200600332','200703754','200805644','200900262')
from ja_in_receipt_tax_lines jtl, rcv_shipment_lines rcl,
rcv_shipment_headers rch
where rch.receipt_num like '200604211'
and jtl.tax_type in ('Service')
and rcl.shipment_line_id = jtl.shipment_line_id
and rcl.shipment_header_id = rch.shipment_header_id
-----------------------------------------------------------------------
SELECT /*+INDEX (RSH RCV_SHIPMENT_HEADERS_U1) INDEX (GCCK GL_CODE_COMBINATIONS_U1)*/
rsh.receipt_num, rt.transaction_type, NULL account_type,
gcck.concatenated_segments, rrsl.accounted_cr, rrsl.accounted_dr,
rrsl.currency_code, ood.organization_code organization_code,
rrsl.accounting_date gl_date
FROM rcv_receiving_sub_ledger rrsl,
rcv_transactions rt,
rcv_shipment_headers rsh,
gl_code_combinations_kfv gcck,
org_organization_definitions ood
WHERE rrsl.rcv_transaction_id = rt.transaction_id(+)
AND rt.shipment_header_id = rsh.shipment_header_id(+)
AND rrsl.code_combination_id = gcck.code_combination_id(+)
AND rsh.organization_id = ood.organization_id(+)
AND rsh.receipt_num in ('200500915','200502972','200600332','200703754','200805644','200900262')
UNION
SELECT jirjb.receipt_num, jirjb.acct_nature, jirjb.acct_type,
gcck.concatenated_segments, jirjb.entered_cr, jirjb.entered_dr,
jirjb.currency_code, ood.organization_code organization_code,
jirjb.transaction_date gl_date
FROM ja_in_rcv_journals_b jirjb,
gl_code_combinations_kfv gcck,
org_organization_definitions ood
WHERE jirjb.code_combination_id = gcck.code_combination_id(+)
AND jirjb.organization_code = ood.organization_code(+)
AND jirjb.receipt_num in ('200500915','200502972','200600332','200703754','200805644','200900262')
No comments:
Post a Comment