Protected by Copyscape Web Copyright Protection Software

Pages

Search This Blog

Showing posts with label Query to get Full Back Orders. Show all posts
Showing posts with label Query to get Full Back Orders. Show all posts

Monday, December 2, 2013

Query to get Full Back Orders

Fully Back orders Query:
-----------------------------------
SELECT *
FROM     oe_order_headers_all oh
       , wsh_delivery_details wd
       ,oe_order_lines_all ool
WHERE
       oh.header_id = wd.source_header_id
AND    wd.released_status = 'B'
and    ool.HEADER_ID=oh.header_id
AND    NOT EXISTS (
                      SELECT 1
                      FROM  wsh_delivery_details wd1
                      WHERE wd1.released_status! = 'B'
                      AND   wd1.source_header_id = oh.header_id
                   )