Archive Database query

robtsc2000

New member
Local time
Today, 08:53
Joined
Jul 8, 2013
Messages
1
I need to produce a query that will show only one File and location even though there are multiple records contained within that File. To clarify,
In each individual record I have Id_No, Surname, File_Name, DOB, Location.

I need to shred the file once the person is over 25 years old, but some File_Name have different people with different dates of birth. I would like to display the File_Name only if all of other records in that File_Name are over 25 years. I have attached a picture of the query which I use to find the over 25's

If anyone could help I would be truly greatful

Rob
 

Attachments

  • over 25's Query.JPG
    over 25's Query.JPG
    85.7 KB · Views: 64
You might try something like the following:
Code:
SELECT T1.[File Name], MAX(T1.[Date of Birth]) AS [Date of Birth]
FROM [Scott Corridor Archive Table] AS T1
GROUP BY T1.[File Name]
HAVING MAX(T1.[Date of Birth]) <= #15/12/1986#;
 

Users who are viewing this thread

Back
Top Bottom