If the table is not too big, this would do it:
SELECT BanID
FROM GuestbookBans
WHERE AuthorsIP NOT IN
    (SELECT DISTINCT AuthorsIP FROM GuestbookBans)

This will give you all entries appearing more than once.
Now if you want to delete all but one, then it's another story ;-)
I suppose you need to do this only once, so the simplest would be to do it
in a CFOUTPUT loop with a group in BanId.

-- 
_______________________________________
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: http://www.houseoffusion.com/groups/SQL/message.cfm/messageid:3016
Subscription: http://www.houseoffusion.com/groups/SQL/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.6

Reply via email to