Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Compare 2 tables...

Status
Not open for further replies.

upthecreek

Technical User
Jul 1, 2005
2
GB
Hi All,

I am attempting to write a query that will allow me to list all employees that do not have related records in another table.

* Empolyee Table (primary key is employeeID)

* Task Table (employeeID links to task_employeeID)

I need to find out which empolyees have no tasks in the task table.

I have tried many things but just can't get my head around it. Anyone have any ideas?

Thanks in advance,

Chris
 
many ideas...

why don't you post the SQL's you have tried to far, along with some input data of all related tables, the results you had and the expected results.

A particular type of join will give you the results you need if you associate it with a test for NULL fields in a particular way.

Many examples of this have been posted on these forums, so you should be able to search for similar situations.

Regards

Frederico Fonseca
SysSoft Integrated Ltd
 
Thanks,

I didn't think that this would have been such a popular quuestion! I will continue to crawl through the the search results.

Cheers,

Chris
 
And why not follow the unmatched query wizard ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top