Jump to content

Query for non-existance


rmeeuwsen

Recommended Posts

I have two tables who both contain a field songwriter. 1 table is for a top 100 listing and the other is for songwriters. Songwriters may or may not occur in the top 100 table. How can I define a query that gives me all the songwriters that do not occur in the top 100 table?

 

Thanks in advance!

 

Robin Meeuwsen

Link to comment
https://forums.phpfreaks.com/topic/136034-query-for-non-existance/
Share on other sites

OK. Another approach:

 

3 tables,

 

tbl_projects

-----------------

project_id

name

 

tbl_employees

---------------------

employee_id

name

 

tbl_x

-------

x_id

project_id

employee_id

 

An employee can be working on several projects and a project can be worked by several employees. To create these relationships I created tbl_x which stores a record for every relationship. Now what I want to generate a list with all employees that are not working on any project.

 

Thanks in advance!

 

Robin Meeuwsen

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.