De-dupe the list then count it
:)

-Jack





-----Original Message-----
From: Les Mizzell [mailto:[EMAIL PROTECTED]
Sent: Monday, August 04, 2003 10:33 AM
To: CF-Talk
Subject: RE: What the heck is wrong with this Query?


The query itself doesn't error out like this, but I'm not getting the needed
results to "count" categories like I need:

<cfquery name="PA_CT" datasource="phoenixart">
SELECT DISTINCT PA_COUNTRY, ID, PA_CATEGORY
FROM papers
GROUP BY PA_COUNTRY, ID, PA_CATEGORY
</cfquery>

<CFSET egypt_Count =
ListValueCountNoCase(ValueList(PA_CT.PA_COUNTRY),"egypt")>



This should give me the number of distinct "categories" for the distinct
country, "egypt". However, it's counting each individual instance, not the
unique ones:

This is a "flat" database - so, I'm trying to group the countries, and then
count the number of unique catagories for each country...



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to