My question is this:
Is there any way you use DISTINCT in a select query involving multiple fields and not get dupes? For example Im trying to run the following:
SELECT DISTINCT tbl_OH.phone_num, tbl_OH.customer_id, tbl_OH.last_name, tbl_OH.first_name, tbl_OH.zip5, tbl_OH.Current, tbl_OH.order_date
FROM tbl_OD INNER JOIN tbl_OH ON tbl_OD.order_num = tbl_OH.order_num
GROUP BY tbl_OH.phone_num, tbl_OH.customer_id, tbl_OH.last_name, tbl_OH.first_name, tbl_OH.zip5, tbl_OH.Current, tbl_OH.order_date
HAVING (((tbl_OH.Current) Not In ("CMPL","DEL"," ") AND ((tbl_OH.order_date)=#1/21/2004#-4));
I DO NOT want duplicate phone numbers returned but I am getting dupes. The reason is...is that if one value is different in a row it's not treated as a dupe.
So...is there any way to return DISTINCT phone numbers in a multi field query? If I do a select Distinct tbl_OH.phone_number from tbl_OH I WILL get NO DUPES. But if i start adding other fields in the query I WILL get dupes.
Any help?
Is there any way you use DISTINCT in a select query involving multiple fields and not get dupes? For example Im trying to run the following:
SELECT DISTINCT tbl_OH.phone_num, tbl_OH.customer_id, tbl_OH.last_name, tbl_OH.first_name, tbl_OH.zip5, tbl_OH.Current, tbl_OH.order_date
FROM tbl_OD INNER JOIN tbl_OH ON tbl_OD.order_num = tbl_OH.order_num
GROUP BY tbl_OH.phone_num, tbl_OH.customer_id, tbl_OH.last_name, tbl_OH.first_name, tbl_OH.zip5, tbl_OH.Current, tbl_OH.order_date
HAVING (((tbl_OH.Current) Not In ("CMPL","DEL"," ") AND ((tbl_OH.order_date)=#1/21/2004#-4));
I DO NOT want duplicate phone numbers returned but I am getting dupes. The reason is...is that if one value is different in a row it's not treated as a dupe.
So...is there any way to return DISTINCT phone numbers in a multi field query? If I do a select Distinct tbl_OH.phone_number from tbl_OH I WILL get NO DUPES. But if i start adding other fields in the query I WILL get dupes.
Any help?