try:

SELECT email, first(firstname), first(lastname)
FROM people
GROUP BY email;

-- Sam


-----Original Message-----
From: Jeff Green [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 18, 2002 4:15 PM
To: CF-Talk
Subject: SQL DISTINCT Question


SELECT DISTINCT Email
FROM LinkedEmails

returns a record set with no dupe emails, but I want first and last names as
well so i try

SELECT DISTINCT Email, FirstName, LastName
FROM LinkedEmails

returns a record set that has dupe email fields

How would I query for unique emails and get the first and last names without
getting dupe emails

TIA,
jeff

______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to