why sum?  why not count(*)?

Chris Olive
DOHRS Website Administrator
[EMAIL PROTECTED]


-----Original Message-----
From: Don Vawter [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 27, 2000 9:09 PM
To: [EMAIL PROTECTED]
Subject: Re: Seeing this?


This should do it.

 <CFQUERY DATASOURCE="userdb">
 SELECT username, SUM(username) FROM users
GROUP BY username
HAVING sum(username) > 1
 </CFQUERY>

----- Original Message -----
From: "John N Westerlund" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 27, 2000 5:28 PM
Subject: Re: Seeing this?


> At my wits end. Im trying to find duplicate users in a database...
> The closest I can find to in the Forta book is:
>
> <CFQUERY DATASOURCE="userdb">
> SELECT SUM(username) FROM users GROUP BY username
> </CFQUERY>
>
> But I tried that last week and it doesnt work.
> I'd like it just to do
>
> <cfif num_user_records GT 1>
> #username#<br>
> </cfif>
>
> Should I use a cfloop, list, array?
>
>
> -----Original Message-----
> From: Chris Farrugia <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
> Date: Monday, March 27, 2000 7:17 PM
> Subject: Seeing this?
>
>
> I can't seem to get my messages to post on the list.  Lets see if this one
> works.
>
> --------------------------------------------------------------------------
--
> --
> Archives: http://www.eGroups.com/list/cf-talk
> To Unsubscribe visit
> http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
> send a message to [EMAIL PROTECTED] with 'unsubscribe' in
> the body.
>
>
> --------------------------------------------------------------------------
----
> Archives: http://www.eGroups.com/list/cf-talk
> To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.

----------------------------------------------------------------------------
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to