Hold your horses, this is not a duplicate question.
In the simplest form of the question, I need to have a query that draws from two tables remove duplicate listings of a certain field and continue to show the rest of the data.
More detail:
I have two tables, ParentFiles and StudentFiles. Since we have many students who are in the same family I based the Address in ParentFiles and link appropriately to the StudentFiles table.
What I need to be able to do is print labels with the Students being addressed but only sending one letter to each household (realizing that it would probably way too complicated to include all the children on a single mailing label).
So I have my FirstName, LastName, Address, City, State, and ZIP fields. FirstName and LastName being drawn from the StudentFiles Table and the rest of the fields from the ParentFiles.
What would be the most efficient way of removing duplicate mailings to the same household.
Bonus: If you have a thought on how to add all the children linked to that Parent to a single label so that the label reads appropriately, "To the parents of John, Mary and PoPo Jones" or whatever, but hardly something I'd request.
Thank you for any help you can provide.
P.S. I did look into a query looking like this:
SELECT DISTINCTROW FIRST([field]) AS myvar, COUNT([field]) AS anotherVar
FROM table GROUP BY [field]
HAVING COUNT([field])>=1;
but I was unable to make it function correctly given my constraints. Thank you! - William ~^~ ~^~
~ W . I . L . L . Y . U . M ~
Did you smile at your friends today?
In the simplest form of the question, I need to have a query that draws from two tables remove duplicate listings of a certain field and continue to show the rest of the data.
More detail:
I have two tables, ParentFiles and StudentFiles. Since we have many students who are in the same family I based the Address in ParentFiles and link appropriately to the StudentFiles table.
What I need to be able to do is print labels with the Students being addressed but only sending one letter to each household (realizing that it would probably way too complicated to include all the children on a single mailing label).
So I have my FirstName, LastName, Address, City, State, and ZIP fields. FirstName and LastName being drawn from the StudentFiles Table and the rest of the fields from the ParentFiles.
What would be the most efficient way of removing duplicate mailings to the same household.
Bonus: If you have a thought on how to add all the children linked to that Parent to a single label so that the label reads appropriately, "To the parents of John, Mary and PoPo Jones" or whatever, but hardly something I'd request.
Thank you for any help you can provide.
P.S. I did look into a query looking like this:
SELECT DISTINCTROW FIRST([field]) AS myvar, COUNT([field]) AS anotherVar
FROM table GROUP BY [field]
HAVING COUNT([field])>=1;
but I was unable to make it function correctly given my constraints. Thank you! - William ~^~ ~^~
~ W . I . L . L . Y . U . M ~
Did you smile at your friends today?