SQL Language (MOSC)

MOSC Banner

How to select Sales Orders where all lines and closed, yet the order is still in booked status?

edited Jan 29, 2016 1:29PM in SQL Language (MOSC) 3 commentsAnswered ✓

Hello,

I'm new to SQL.  I need to be able to select Sales Orders where all the LINES have Status = Closed and the HEADER has a Status = Booked.  This is for RMA (customer return) sales orders.  We discovered a system issue where the header is not automatically closing after all lines are fulfilled/closed, so I want to find the volume of sales order records with this condition.


Below is what I have so far.  What do I need to add to this statement to only select headers where ALL lines are closed?

SELECT ooh.order_number, ool.line_number 

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center