SELECT oha.order_number,
ola.ordered_item item_name,
ola.ordered_quantity * ola.unit_selling_price LINE_AMOUNT,
rcta.trx_number Transaction_number, rcta.trx_date,
rctla.line_number TRX_line_number,
rctla.unit_selling_price unit_selling_price
FROM
oe_order_headers_all oha,
oe_order_lines_all ola,
ra_customer_trx_all rcta,
ra_customer_trx_lines_all rctla
WHERE oha.header_id =
ola.header_id
AND
rcta.customer_trx_id = rctla.customer_trx_id
AND
rctla.interface_line_attribute6 = TO_CHAR (ola.line_id)
AND
rctla.interface_line_attribute1 = TO_CHAR (oha.order_number)
AND
oha.cust_po_number = :cust_po_number
No comments:
Post a Comment