Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

count problem

Status
Not open for further replies.

cvaccess

Technical User
Jun 26, 2002
55
US
I have a table that contains duplicate values. I want to count one instance of each. For example, the table pend_list has claim_no field with data:

claim_no
2215176239
2215176239
2215176240
2215176241
2215176245
2215176247
2215176247

The count of the claim_no should be 5 but I keep on getting 7 since it is counting the dup claim_no. How can I change this query to count appropriately?

SELECT DISTINCTROW Count(pend_list.CLAIM_NO) AS ClaimCount
FROM pend_list;

Thanks.
 
Hi there!

Within the Query Properties of your query try setting the Unique Values to No.

The query will then (should!)just display distinct records only on execution.

Best wishes

Magnetar [atom]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top