Jay,

Try the query with DISTINCT:

> SELECT ContestantID
> FROM ResultsManager
> GROUP BY ContestantID
> HAVING COUNT (DISTINCT EventID) >= 2

Cheers,
Seva Petrov


> -----Original Message-----
> From: Jay Patton [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 29, 2001 11:37 AM
> To: CF-Talk
> Subject: Correct Me if im wrong. PLEASE!
> 
> 
> but....
> this statement DOES Say "Select ONLY the ContestantID's that have 
> 2 or more DIFFERANT EventID's in the ResultsManager."
> 
> SELECT ContestantID
> FROM ResultsManager
> GROUP BY ContestantID
> HAVING COUNT (EventID) >= 2
> 
> OR does this just pull all the contestantID's that are in there 
> twice wether they have two DIFFERANT Event's or not?
> Could someone please help me out here. im trying to get ONLY 
> Those that have two differant EventID's in this table.
> 
> Thanks!,
> 
> Jay Patton
> Web Design / Application Design
> Web Pro USA
> p. 406.549.3337 ext. 203
> p. 1.888.5WEBPRO ext. 203
> e. [EMAIL PROTECTED]
> url. www.webpro-usa.com
> 
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to