Thursday, 17 July 2014

List Freight charge Details for a Given Order Query

/* Formatted on 7/17/2014 12:39:20 PM (QP5 v5.115.810.9015) */
SELECT ool.ordered_item,
       opa.operand_per_pqty,
       opa.adjusted_amount,
       qlh.name,
       qll.list_line_no
FROM oe_order_headers_all ooh,
     oe_order_lines_all ool,
     oe_price_adjustments opa,
     qp_list_headers_vl qlh,
     qp_list_lines qll
WHERE     order_number = 10000
      AND ool.header_id = ooh.header_id
      AND opa.line_id = ool.line_id
      AND opa.list_line_type_code = 'FREIGHT_CHARGE'
      AND qlh.list_header_id = opa.list_header_id
      AND qll.list_line_id = opa.list_line_id

No comments:

Post a Comment