Kostas Konstantinidis
kost36 at otenet.gr
Sun Jan 18 04:22:04 CST 2015
Steve, What I really need is something like the follow... but it doesn't work. I don't want to count records but to find the film titles depending on searching by T_people.person SELECT MT_films.Title1, T_people.person FROM T_people INNER JOIN (MT_films INNER JOIN ST_peoplefilms ON MT_films.ID_films = ST_peoplefilms.ID_films) ON T_people.ID_person = ST_peoplefilms.ID_person GROUP BY MT_films.Title1, T_people.person HAVING (((T_people.person)=[Enter 1st name] And (T_people.person)=[Enter 2nd name])); Regards /kostas -----Αρχικό μήνυμα----- From: Steve Schapel Sent: Sunday, January 18, 2015 11:43 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] How to search two records in the same field of a table Kostas Try it like this?... SELECT IDfilms, Count(IDpeople) AS PeoplePerFilm FROM YourTable GROUP BY IDfilms HAVING Count(IDpeople)=2 Or Count(IDpeople)=3 Regards Steve -----Original Message----- From: Kostas Konstantinidis Sent: Sunday, January 18, 2015 10:22 PM To: Access Developers discussion and problem solving Subject: [AccessD] How to search two records in the same field of a table Hi all, I have a table with: IDfilms and IDpeople What I need to do is to find after searching all the IDfilms in which two or three IDpeople worked together I tried a union query but it doesn't work thank's a lot /kostas -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com