SELECT ho.name hold_name,
hs.hold_until_date,
hs.hold_comment,
h.order_number,
oh.header_id,
oh.line_id,
oh.order_hold_id,
l.item_identifier_type,
l.inventory_item_id,
l.ordered_item
FROM oe_order_holds_all oh,
oe_order_lines_all l,
oe_order_headers_all h,
oe_hold_definitions ho,
oe_hold_sources_all hs
WHERE h.order_number = 14463
AND oh.header_id = h.header_id
AND (h.cancelled_flag IS NULL OR h.cancelled_flag = 'N')
AND h.open_flag = 'Y'
AND oh.hold_source_id = hs.hold_source_id
AND hs.hold_id = ho.hold_id
AND h.header_id = l.header_id(+)
AND l.open_flag = 'Y'
AND l.line_id = NVL (oh.line_id, l.line_id)
AND l.service_reference_line_id IS NULL
AND oh.hold_release_id IS NULL
AND NVL (h.org_id, 0) = 204
AND NVL (l.org_id, 0) = NVL (h.org_id, 0)
ORDER BY ho.name, h.order_number
hs.hold_until_date,
hs.hold_comment,
h.order_number,
oh.header_id,
oh.line_id,
oh.order_hold_id,
l.item_identifier_type,
l.inventory_item_id,
l.ordered_item
FROM oe_order_holds_all oh,
oe_order_lines_all l,
oe_order_headers_all h,
oe_hold_definitions ho,
oe_hold_sources_all hs
WHERE h.order_number = 14463
AND oh.header_id = h.header_id
AND (h.cancelled_flag IS NULL OR h.cancelled_flag = 'N')
AND h.open_flag = 'Y'
AND oh.hold_source_id = hs.hold_source_id
AND hs.hold_id = ho.hold_id
AND h.header_id = l.header_id(+)
AND l.open_flag = 'Y'
AND l.line_id = NVL (oh.line_id, l.line_id)
AND l.service_reference_line_id IS NULL
AND oh.hold_release_id IS NULL
AND NVL (h.org_id, 0) = 204
AND NVL (l.org_id, 0) = NVL (h.org_id, 0)
ORDER BY ho.name, h.order_number
No comments:
Post a Comment