SELECT email, id, first, last
FROM MyTable
GROUP BY email
HAVING COUNT > 1
"tom muck" <[EMAIL PROTECTED]> on 09/13/2000 04:34:00 PM
Please respond to [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
cc: (bcc: Jerry Tolentino/SIAC)
Subject: Distinct query
Does anyone know how I would go about setting up a CFQUERY where I can get
ALL
fields where one column has duplicate values, and that column needs to be
de-duped? I thought something like this would work:
Select DISTINCT email, id, first, last from myTable
but it returns all rows because the ID column is a primary key and has no
duplicates. Essentially, if one person is in the database twice, he'll
have two
different ID numbers, but I need to throw away one of them. Is there an
easy
way to do this?
tom
---------------------------------------------------------------------------
---
Archives: http://www.mail-archive.com/[email protected]/
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.mail-archive.com/[email protected]/
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.