Skip to content
Advertisement

How to select records with a combination of values exist between two tables

I cannot figure this one out, I want to check these two tables, where ALL LadReady are ‘Shi’ for a given LadSeries. This query is almost there… but 410 should not be in the results because there is clearly one record where LadReady is ‘Yes’ instead of ‘Shi’.

Query:

Table: Shipping

Table: Drawings

Results:

The first result above, 410 should NOT be there because we have one record that is LadReady=’Yes’ instead of ‘Shi’.

Advertisement

Answer

Try the following query. first restrict the shipping rows to be only the valid ones, then join it to drawings

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