query being used to make mail merge list

Mike Hughes

Registered User.
Local time
Today, 23:48
Joined
Mar 23, 2002
Messages
493
I plan on doing a mail merge which will include the case id(s) from the data collected with this query. There are clients who have more than one case id but I only want to send them one letter that lists both cases and I’m not sure how to do that. Is it something I do within this query, another query or the mail merge document itself. Can you give me an idea of how to accomplish this?

SELECT
NOLDBA_INT_CASE_MEMBER.CASE_ID,
NOLDBA_INT_CASE_MEMBER.MEMBER_ID, NOLDBA_INT_MEMBER_DEMOGRAPHIC.NAME_LAST, NOLDBA_INT_MEMBER_DEMOGRAPHIC.NAME_FIRST, NOLDBA_INT_ADDRESS_HISTORY.ADDR_LINE1,
NOLDBA_INT_ADDRESS_HISTORY.ADDR_LINE2,
NOLDBA_INT_ADDRESS_HISTORY.ADDR_LINE3,
NOLDBA_INT_ADDRESS_HISTORY.CITY,
NOLDBA_INT_ADDRESS_HISTORY.STATE,
NOLDBA_INT_ADDRESS_HISTORY.ZIP INTO [CLIENTS_ADDRES]
FROM ((([never assistance cases] INNER JOIN NOLDBA_INT_CASE_MEMBER ON [never assistance cases].ID_CASE = NOLDBA_INT_CASE_MEMBER.CASE_ID) INNER JOIN NOLDBA_INT_MEMBER_DEMOGRAPHIC ON NOLDBA_INT_CASE_MEMBER.MEMBER_ID = NOLDBA_INT_MEMBER_DEMOGRAPHIC.MEMBER_ID) INNER JOIN NOLDBA_INT_ADDRESS_HISTORY ON NOLDBA_INT_MEMBER_DEMOGRAPHIC.MEMBER_ID = NOLDBA_INT_ADDRESS_HISTORY.MEMBER_ID) LEFT JOIN NEVER_ASSISTANCE_CLIENTS_ADDRES ON NOLDBA_INT_CASE_MEMBER.MEMBER_ID = NEVER_ASSISTANCE_CLIENTS_ADDRES.CLIENT

WHERE (((NOLDBA_INT_CASE_MEMBER.RELATION_CODE)="C") AND ((NOLDBA_INT_ADDRESS_HISTORY.ADDR_TYPE)="M") AND ((NOLDBA_INT_ADDRESS_HISTORY.DATE_END)=#12/31/9999#) AND ((NOLDBA_INT_ADDRESS_HISTORY.DATE_CONFIRMED)<>#12/31/9999#) AND ((NEVER_ASSISTANCE_CLIENTS_ADDRES.CLIENT) Is Null));

Sorry if this should not be posted here, just looking for some ideas.
Thanks Mike
 
Including the case information creates the duplicates. Do you include case information when you do the merge? What do you want to do when a client has multiple cases?

I'm not sure what you want to do.
 

Users who are viewing this thread

Back
Top Bottom