Thursday, June 19, 2008

List Freight charge Details for a Given Order

This query will give freight for individual order line of a given order.


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