I request data and it returns fine, but I am creating a mailing list for my boss,
and need to eliminate email duplicates. I am proficient in ASP which is the interface
he will use - but I thought eliminating duplicates at query level was better. I show example data below
but keep in mind the numbers are returning fine and the emails return fine but the example shows the
duplicate entry for email address can appear in any column or row...matching with any other column and row...
you could have the same email for offices but with different associated rep email addresses... works like a tree
where regions are over offices and offices over reps.
thanks for any help...
This is a rough look at my tables - which I can't alter.
sales_representative sales_office sales_region
__________________________________________________ ______________________
sales_region_number sales_office_number sales_region_number
sales_office_number email_address email_address
sales_rep_number
email_address
Here is my select statement:
__________________________________________________ __________________________
Select sales_representative.sales_rep_number,sales_repres entative.email_address,
sales_office.sales_office_number,sales_office.emai l_address,
sales_region.sales_region_number,sales_region.emai l_address
FROM sales_representative LEFT JOIN sales_office
ON (sales_representative.sales_office_number=sales_of fice.sales_office_number)
JOIN sales_region
ON (sales_representative.sales_region_number=sales_re gion.sales_region_number)
sample data return in query analyzer
__________________________________________________ ________________________________________
sales_rep_number - email_address - sales_office_number - email_address - sales_region_number - email_address
0000001
[email protected] 0000001
[email protected] 0000001
[email protected]
0000007
[email protected] 0000003
[email protected] 00000007
[email protected]
00000010
[email protected] 00005
[email protected] 000004
[email protected]