Chủ Nhật, 20 tháng 11, 2016

Join condition between RA_CUSTOMER_TRX_ALL and OE_ORDER_HEADERS_ALL/LINES_ALL

Here is the query to find link of Sales Orders with their corresponding Invoices
/**************************************************************************
 *PURPOSE: To find link of Sales Orders with their corresponding Invoices *
 *AUTHOR: Shailender Thallam                                              *
 **************************************************************************/
SELECT ooh.order_number, ool.line_number, ool.ordered_item,
       ool.ordered_quantity * ool.unit_selling_price,
       rcta.trx_number invoice_number, rcta.trx_date, rctl.line_number,
       rctl.unit_selling_price, ooh.org_id
  FROM oe_order_headers_all ooh,
       oe_order_lines_all ool,
       ra_customer_trx_all rcta,
       ra_customer_trx_lines_all rctl
 WHERE ooh.header_id = ool.header_id
   AND rcta.interface_header_context = 'ORDER ENTRY'
   AND rctl.interface_line_context = 'ORDER ENTRY'
   AND rctl.interface_line_attribute1 = TO_CHAR (ooh.order_number)
   AND rctl.interface_line_attribute6 = TO_CHAR (ool.line_id)
   AND rctl.customer_trx_id = rcta.customer_trx_id
   AND ooh.order_number = NVL (:p_order_number, ooh.order_number)
--AND  ooh.org_id=nvl(:p_org_id,ooh.org_id)
;

1 nhận xét:

  1. casino december 2021 - Dr.MD
    2021 - JackpotCity Casino in New 제주도 출장안마 Jersey 원주 출장샵 is an online 파주 출장마사지 casino and 군산 출장안마 poker room. Check our reviews, ratings 보령 출장마사지 and offers! Rating: 3.2 · ‎10 votes

    Trả lờiXóa