I would think it returns all distinct columns that you are selecting.  I
do not know exactly what is going on in your needs and wanted results, but
maybe a subquery with an IN statement would be a simple enough way to get
those results.  Such as:

SELECT Email, My_id, MyDisplay, MyPassword
FROM EmailAccts
WHERE Email IN (SELECT DISTINCT Email FROM EmailAccts)

Snipe - <CF_BotMaster Network="EFNet" Channel="ColdFusion">

On Wed, 6 Feb 2002, Tyler Silcox wrote:

> 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 f
or
> 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

Reply via email to