> I just want 1 LeadID and 1 Email out of the 4 records.

Which one LeadID?  If you want the min, just do:

SELECT Email MIN(LeadID) AS LeadID
FROM Leads
group by Email


On Wed, Mar 17, 2010 at 11:25 AM, Casey Dougall <
[email protected]> wrote:

>
> Hi,
>
> This always drives me nuts and I can never figure it out or where on earth
> I'm doing something simular.
>
>
>
>  LeadID Email  1 [email protected]  2 [email protected]  3 [email protected] 4
> [email protected]
>
> I just want 1 LeadID and 1 Email out of the 4 records.
>
> Why can't you group by 1 column when really want to select 2 or more at the
> same time. :-(
>
>   SELECT distinct (Email), LeadID
>   FROM Leads
>   group by Email
>
> I just wish that would work. Mind you there a bunch of additional columns
> so
> it's more like needing
>
> SELECT distinct (Email), LeadID, FirstName, LastName
> FROM Leads
>
>
> Dam I hate this scenario.
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331825
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to