I'm trying to identify duplicate entries in a small table that has two
columns - a Id column and the main data column. It's a table of banned IP
addresses of people identified as spamming my sites. I want to reduce the
table to eliminate duplicate iPs.
The table is:
CREATE TABLE [dbo].[GuestbookBans](
[BanID] [int] IDENTITY(1,1) NOT NULL,
[AuthorsIP] [nvarchar](50) COLLATE Latin1_General_CI_AS NULL,
CONSTRAINT [PK_GuestbookBans] PRIMARY KEY CLUSTERED
(
[BanID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
I'm afraid the heat is getting to me right now. I suspect the answer is a
select banid,authorsip where ( ) and some kind of join or union on a
subquery but my brain isn't connecting. My excuse is it's stinking hot on
a Sunday afternoon.
Can anyone help me please? What I want to find is the ip addresses that
are duplicated in the table. The table has over 4000 records so it'a bit
tiresome to just look through the records with my MKi Eye.
Cheers
Mike Kear
Windsor, NSW, Australia
0422 985 585
Adobe Certified Advanced ColdFusion Developer
AFP Webworks Pty Ltd
http://afpwebworks.com
Full Scale ColdFusion hosting from A$15/month
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:3015
Subscription: http://www.houseoffusion.com/groups/SQL/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.6