Query to show whether an entry from one table is in the other
This might be simple, but I can't figure it out.
In one table i have all the people, in the other some event with that people.
I'd like to make a query where in first coloumn I get a list of people from table one and in the other a simple yes/no, based on whether their ID is in table two.
Open your query builder and ADD both tables (people and events).
Select fields from your PEOPLE table and at least one field from your EVENTS table. They should be joined via the Primary Key of the People table.
Right click on the join between the 2 tables and select JOIN PROPERTIES.
Select "Include all records from PEOPLE and only those from EVENTS where joined fields are equal."
Use this formula in your YES/NO field:
That is one way of doing it...
Asked in February 2016Viewed 1,270 timesVoted 5Answered 1 times