Hi and thanks for looking at my question.
I'm using Access 2010 and have question about queries, apologies if it's really basic! I manage an SQL server and have a reasonable knowledge of Access, I can make tables, create select/update/delete queries and create linked tables using SQL data. I have a basic knowledge of SQL select statements etc.
I have two tables, linked by a field called 'intcallageid' which is the primary key in the first table. In the second table there are many records with the same value for 'intcallageid'.
I have a query that selects data from the first table and this runs fine. I would like to add a criteria so that the query returns only the rows from the first table where there is at least one entry for 'intcallageid' in the second table. However it should not return any data from the second table, just check to see if entries exist in there for the 'intcallageid' value.
When I make the second table visible but don't add any of its fields to the query I get one row returned for every entry in the second table.
What's the best way to get one row for every entry in the first table IF there is at least one entry for the 'intcallageid' in the second table? can it be done in the query design view, or does it require SQL?
Thanks for your help!
I'm using Access 2010 and have question about queries, apologies if it's really basic! I manage an SQL server and have a reasonable knowledge of Access, I can make tables, create select/update/delete queries and create linked tables using SQL data. I have a basic knowledge of SQL select statements etc.
I have two tables, linked by a field called 'intcallageid' which is the primary key in the first table. In the second table there are many records with the same value for 'intcallageid'.
I have a query that selects data from the first table and this runs fine. I would like to add a criteria so that the query returns only the rows from the first table where there is at least one entry for 'intcallageid' in the second table. However it should not return any data from the second table, just check to see if entries exist in there for the 'intcallageid' value.
When I make the second table visible but don't add any of its fields to the query I get one row returned for every entry in the second table.
What's the best way to get one row for every entry in the first table IF there is at least one entry for the 'intcallageid' in the second table? can it be done in the query design view, or does it require SQL?
Thanks for your help!