I am new to CR and I am using CR V7. I am trying to get members' names and address to be printed on mailing lables. I have defined selection criteria in the select expert. However, certain members have multiple records that fall in the range of the selection criteria. As a result Identical names and address printed out multiple times. I tried using SELECT DISTINCT and it did not help, cause they are DISTINCT except for names and addresses. How do get distinct name and address only?? Any tip or suggestion is much appreciated in advance. SQL queries are copied as follow:
SELECT
claimdetail."servcode", claimdetail."dosto",
member."dob",
entity."entname", entity."addr1", entity."addr2", entity."city", entity."state", entity."zip"
FROM
{ oj (((claim INNER JOIN enrollment ON
claim."enrollid" = enrollment."enrollid"
INNER JOIN claimdetail ON
claim."claimid" = claimdetail."claimid"
INNER JOIN member ON
enrollment."memid" = member."memid"
INNER JOIN entity ON
member."entityid" = entity."entid"}
WHERE
(claimdetail."servcode" = 'Z9000' OR
claimdetail."servcode" = '99395' OR
claimdetail."servcode" = '99394' OR
claimdetail."servcode" = '99393' OR
claimdetail."servcode" = '99392' OR
claimdetail."servcode" = '99391' OR
claimdetail."servcode" = '99385' OR
claimdetail."servcode" = '99384' OR
claimdetail."servcode" = '99383' OR
claimdetail."servcode" = '99382' OR
claimdetail."servcode" = '99381')
SELECT
claimdetail."servcode", claimdetail."dosto",
member."dob",
entity."entname", entity."addr1", entity."addr2", entity."city", entity."state", entity."zip"
FROM
{ oj (((claim INNER JOIN enrollment ON
claim."enrollid" = enrollment."enrollid"
INNER JOIN claimdetail ON
claim."claimid" = claimdetail."claimid"
INNER JOIN member ON
enrollment."memid" = member."memid"
INNER JOIN entity ON
member."entityid" = entity."entid"}
WHERE
(claimdetail."servcode" = 'Z9000' OR
claimdetail."servcode" = '99395' OR
claimdetail."servcode" = '99394' OR
claimdetail."servcode" = '99393' OR
claimdetail."servcode" = '99392' OR
claimdetail."servcode" = '99391' OR
claimdetail."servcode" = '99385' OR
claimdetail."servcode" = '99384' OR
claimdetail."servcode" = '99383' OR
claimdetail."servcode" = '99382' OR
claimdetail."servcode" = '99381')