Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help urgent query problem

Status
Not open for further replies.

tizwaz

Technical User
Aug 8, 2002
437
0
0
GB
we have a table which was created from a number of text files containing data relating to names and addresses. We need to use the names and addresses for a mail merge. The problem is there are 4 records relating to each property each with a common property reference field The 4 records have a field which denotes either Dw for dwelling address, Oc for occupiers name, Ow for Owners name (which may include an address and Ag for Agents name and address We want to produce 1 letter for the occupier combining the name from the oc record and the address from the dw record (the link being the property reference) and 1 for either the owner if there is no agent or the agent if there is one (these are 2 separate records) Also we need to exclude duplicate entries for agents so that only 1 letter goes to 1 agent even if they have entries beside several property references.

Any clues guys as to how to create the necessary queries?

I'd be really grateful my boss needs this kinda yesterday

 
Create the query (design Mode) and select the group by function. This will allow you to get rid of the duplicate entries.
 
This sounds like you are attempting 3 different queries (to drive 3 different letters). IF this is not your plan, I would suggest using this strategy. Please let us know the name of that "common" property name field. I think I can help if you include this info to clear up these two questions.
Thanks,
Blake
 
Yes I guess I do need 3 different queries. the common field is called propref

Thanks for your help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top