-
Query
I have this query with the following sql. I have an invitee table, contact table and an inmate table the relationship is 1 inmate and 1 contact to many invitee, 1 inmate to many contacts. I would like to display the inmate name, contact name, address, invitee name as you would view in the sql but it is generating duplicate entries once there is an inmate with more than one entry
SELECT [tblContactInfo Query].DteDate, [tblContactInfo Query].StrInmateNo, [tblInmateInfo Query].[Inmate Name], [tblContactInfo Query].[Contact Name], [tblContactInfo Query].StrAddressLine1, [tblContactInfo Query].StrAddressLine2, [tblContactInfo Query].StrParish, [tblContactInfo Query].[Invitee Name], [tblContactInfo Query].StrChild
FROM (tblInmateInfo INNER JOIN [tblInmateInfo Query] ON tblInmateInfo.StrInmateNo = [tblInmateInfo Query].StrInmateNo) INNER JOIN [tblContactInfo Query] ON tblInmateInfo.StrInmateNo = [tblContactInfo Query].StrInmateNo;
-
Try using GROUP BY (Sigma button) in the query.
Why did you include tblInmateInfo in the query?
Cheers,
-
Query
I used the group by and it worked then when i then started a blank database and import the structure only to remove the test data the query refuse to run even if i try to recreate it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules