I'd like to grab all of the distinct emails, and then return the rest of the columns once per unique email. So if there were 2 [EMAIL PROTECTED] in the table, but the rest of the row data was different, I'd like to just grab the first (or last, it really doesn't matter) row of data when the query runs across [EMAIL PROTECTED] ->
Tyler Silcox email | [EMAIL PROTECTED] (duh.) ----- Original Message ----- From: "Christopher Olive" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Wednesday, February 06, 2002 1:45 PM Subject: RE: distinct query>>> it's returning the DISTINCT for all the values you put in the clause. so each distinct combination of email, id, display, etc is returned. what are you trying to do? perhaps there is a better approach. christopher olive, cto, vp of web development atnet solutions, inc. 410.931.4092 http://www.atnetsolutions.com -----Original Message----- From: Tyler Silcox [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 06, 2002 1:42 PM To: CF-Talk Subject: distinct query>>> I'm trying to pull only DISTINCT emails out of the db, shouldn't this do it?: <!--- i select the email accounts ---> <cfquery name="getEmails" datasource="#MyDatasource#" username="#MyUserName#" password="#MyPassword#"> SELECT DISTINCT Email, My_id, MyDisplay, MyPassword FROM EmailAccts </cfquery> cause it doesn't. This returns every row in the table, and I looking for only unique email addresses, and the data that comes along with it. Tyler Silcox email | [EMAIL PROTECTED] website | www.gslsolutions.com ______________________________________________________________________ Why Share? Dedicated Win 2000 Server � PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER Instant Activation � $99/Month � Free Setup http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

