Thanks. That's what I ended up doing. Thing is, I sent the message at 12:45 
and the mothernature mail server was down so it didn't get out till past 6. 
Nothing like a bad mail server to force you to find your own solution. :)


> Michael Dinowitz wrote:
>> Is there an easy way or selecting all rows from one table for insertion
>> into another where the email is distinct along with whatever ID is with 
>> it?
>> If I just do a plain distinct, it'll duplicate emails as the ID will 
>> always
>> be distinct. I can do this a few ways, but none of them seem tight or 
>> clean
>> enough. Any ideas?
>
> INSERT INTO newtable (email, ID)
> SELECT    email, MAX(ID)
> FROM      oldtable
> GROUP BY  email
>
> Jochem
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Flash for programmers - Flash MX Pro
http://www.houseoffusion.com/banners/view.cfm?bannerid=56

Message: http://www.houseoffusion.com/lists.cfm/link=i:6:2094
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/6
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:6
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.6
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to