...

View Full Version : find unrelated records



frank grimes
03-07-2007, 06:25 PM
I need to find records in one table without a match in another.

Right now, I have three tables (staff, topic, topicstaff). There is a many-to-one relationship between topic and staff that's recorded in the topicstaff table. Each topic and each staff member has an ID. The topicstaff table is only these two columns.

My question is, how do I find the topics aren't associated with a staff member? It should be easy as pulling the topic IDs from the topic table that aren't in the topicstaff table. Right?

Any ideas?

Thanks!

:kevin

guelphdad
03-07-2007, 08:00 PM
correct, use a subquery to do it.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum