Skip to content
Advertisement

Return records that only have a certain status from a select query that includes multiple joins

I have a query:

That returns records such as these:

I want to be able to only return records that only have ‘I’ values under Inv_Disp where the Order_Num may or may not be the same. But where if an Order_Num Inv_Disp contains an ‘I’ AND some other value such as ‘CH’ or ‘P’ that it would not return the records for that Order_Num at all.

So the final output should only return:

It should not return

Because I have the two INNER JOINS do I need to SELECT INTO a temp table and then query that temp table or can I just directly query the query somehow? I am probably over-complicating this…

Advertisement

Answer

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement