Monday, March 26, 2012

Duplicate records

I got some 2-5 duplicate records in my database,where in i want to delete al
l
of the duplicate records,when i try doing this from Resultpane I get an Erro
r
message "Key Column Information is insufficient or incorrect.Too many rows
were affected by update"
Please help on this...!
--
SajidWhat is "the result pane"? What applications are you using to delete the row
s? My guess is that the
table is lacking a primary key.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"sajid" <sajid@.discussions.microsoft.com> wrote in message
news:0120C1E5-912C-496A-9A32-62E234B7ACD5@.microsoft.com...
>I got some 2-5 duplicate records in my database,where in i want to delete a
ll
> of the duplicate records,when i try doing this from Resultpane I get an Er
ror
> message "Key Column Information is insufficient or incorrect.Too many row
s
> were affected by update"
> Please help on this...!
> --
> Sajid|||Don't use Enterprise Manager for this.
http://www.aspfaq.com/2431
http://www.aspfaq.com/2509
This is my signature. It is a general reminder.
Please post DDL, sample data and desired results.
See http://www.aspfaq.com/5006 for info.
"sajid" <sajid@.discussions.microsoft.com> wrote in message
news:0120C1E5-912C-496A-9A32-62E234B7ACD5@.microsoft.com...
>I got some 2-5 duplicate records in my database,where in i want to delete
>all
> of the duplicate records,when i try doing this from Resultpane I get an
> Error
> message "Key Column Information is insufficient or incorrect.Too many
> rows
> were affected by update"
> Please help on this...!
> --
> Sajid|||See if this helps:
INF: How to Remove Duplicate Rows From a Table
http://support.microsoft.com/defaul...kb;en-us;139444
You can also add an identity column, use it to identify which rows stay,
delete rows not wanted and then drop the identity column.
AMB
"sajid" wrote:

> I got some 2-5 duplicate records in my database,where in i want to delete
all
> of the duplicate records,when i try doing this from Resultpane I get an Er
ror
> message "Key Column Information is insufficient or incorrect.Too many row
s
> were affected by update"
> Please help on this...!
> --
> Sajid|||You can use this trick
Set rowcount 1
delete * from {Tablename} where {Condition}
It will only delete one row at time.
"Alejandro Mesa" wrote:
[vbcol=seagreen]
> See if this helps:
> INF: How to Remove Duplicate Rows From a Table
> http://support.microsoft.com/defaul...kb;en-us;139444
> You can also add an identity column, use it to identify which rows stay,
> delete rows not wanted and then drop the identity column.
>
> AMB
>
> "sajid" wrote:
>|||Easiet way is to use this command:
Set rowcount 1
Delete from (TableName)where (Condition)
It will only delete one row at time.
"sajid" wrote:

> I got some 2-5 duplicate records in my database,where in i want to delete
all
> of the duplicate records,when i try doing this from Resultpane I get an Er
ror
> message "Key Column Information is insufficient or incorrect.Too many row
s
> were affected by update"
> Please help on this...!
> --
> Sajid|||Easiet way is to use this command:
Set rowcount 1
Delete from (TableName)where (Condition)
It will only delete one row at time.
"sajid" wrote:

> I got some 2-5 duplicate records in my database,where in i want to delete
all
> of the duplicate records,when i try doing this from Resultpane I get an Er
ror
> message "Key Column Information is insufficient or incorrect.Too many row
s
> were affected by update"
> Please help on this...!
> --
> Sajid|||Easiet way is to use this command:
Set rowcount 1
Delete from (TableName)where (Condition)
It will only delete one row at time.
"Alejandro Mesa" wrote:
[vbcol=seagreen]
> See if this helps:
> INF: How to Remove Duplicate Rows From a Table
> http://support.microsoft.com/defaul...kb;en-us;139444
> You can also add an identity column, use it to identify which rows stay,
> delete rows not wanted and then drop the identity column.
>
> AMB
>
> "sajid" wrote:
>

No comments:

Post a Comment