DISTINCT works on all the selected columns

SO with your example below:

  [EMAIL PROTECTED]     Tim Jones
  [EMAIL PROTECTED]     Timothy G. Jones

Each is a distinct record,  the name is different on each one.

Doesn't matter that you added () around email.

-----Original Message-----
From: Jim McAtee [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 27, 2003 3:27 PM
To: CF-Talk
Subject: Re: OT: Problem with DISTINCT()


I thought of that, even though I take care not to insert trailing whitespace
into text fields.  So I printed out Len(email).

18 [EMAIL PROTECTED]     Tim Jones
18 [EMAIL PROTECTED]     Timothy G. Jones

Jim


----- Original Message -----
From: "Jason Miller" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Monday, January 27, 2003 6:24 PM
Subject: Re: OT: Problem with DISTINCT()


> That happened to me too - then I found out it was trailing white
> spaces.. try trimming the white spaces
>
>
>
> Jim McAtee wrote:
>
> >Any ideas why I might be seeing duplicate email addresses in the dataset
> >returned by this simple query (Access 97 via ODBC)?
> >
> ><cfquery name="r" datasource="#dsn#">
> >SELECT DISTINCT(email), name
> >FROM table1
> >WHERE status = 'A'
> >  AND email <> ''
> ></cfquery>
> >
> >In the output, I'm seeing stuff like:
> >
> >[EMAIL PROTECTED]        Bob Smith
> >[EMAIL PROTECTED]        B. Smith
> >
> >The DISTINCT() operates on only the email column in this query, correct?
> >
> >Jim


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to