NimrodHunteR
New member
- Local time
- Today, 18:33
- Joined
- Aug 31, 2012
- Messages
- 1
Hello all,
I am trying to get a query to count a group or same product as 1 record to give me total of customers using this product
example. i have a product coded "an" which has 154 customer using this product but when i use the count total for this product code in access i get "an" totaling 454. its almost as if it is counting some records multiple time almost a like a sum.
here is my query
SELECT RFGCostClass.Product, RFGCostClass.[Service Class], Count(SQLUser_LN_ACCT.col_cd) AS CountOfcol_cd
FROM (RFGCostClass INNER JOIN SQLUser_LN_ACCT ON RFGCostClass.Product = SQLUser_LN_ACCT.col_cd) INNER JOIN SQLUser_MEMBER_ACCT ON SQLUser_LN_ACCT.acn = SQLUser_MEMBER_ACCT.acn
GROUP BY RFGCostClass.Product, RFGCostClass.[Service Class], SQLUser_MEMBER_ACCT.acn_status
HAVING (((RFGCostClass.[Service Class]) Is Not Null) AND ((SQLUser_MEMBER_ACCT.acn_status)="Open"));
If you need anymore info to help me please let me know.
I am trying to get a query to count a group or same product as 1 record to give me total of customers using this product
example. i have a product coded "an" which has 154 customer using this product but when i use the count total for this product code in access i get "an" totaling 454. its almost as if it is counting some records multiple time almost a like a sum.
here is my query
SELECT RFGCostClass.Product, RFGCostClass.[Service Class], Count(SQLUser_LN_ACCT.col_cd) AS CountOfcol_cd
FROM (RFGCostClass INNER JOIN SQLUser_LN_ACCT ON RFGCostClass.Product = SQLUser_LN_ACCT.col_cd) INNER JOIN SQLUser_MEMBER_ACCT ON SQLUser_LN_ACCT.acn = SQLUser_MEMBER_ACCT.acn
GROUP BY RFGCostClass.Product, RFGCostClass.[Service Class], SQLUser_MEMBER_ACCT.acn_status
HAVING (((RFGCostClass.[Service Class]) Is Not Null) AND ((SQLUser_MEMBER_ACCT.acn_status)="Open"));
If you need anymore info to help me please let me know.