If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
In this two tables all table_X records have one or more specific b_id's from another table (table_Z). b_id's in table_Z could be system or not system. What I need is a query that would list all a_id's that does not have any b_id's with system flag. (If a_id has even one b_id that is sytem, it should be not returned).
Good point, I do tend to forget about some records not showing up in the result set. I guess that if the tables were created without referential integrity enforced, the LEFT JOIN would be required.