Monday, March 12, 2012
KEY COULMN INFORMATION IS INSUFFICIENT OR INCORERCT.TOO MANY ROWS
My sql table contains duplicate rows & I am trying to delete those but when
i try to delete or when i try to edit & save the duplicate rows i get the
error ::" KEY COULMN INFORMATION IS INSUFFICIENT OR INCORERCT.TOO MANY ROWS
WERE AFFTECTE DBY UPDATE.
how can i delete these dupliacte rows? I cant even make any column a primary
key coz there are duplicates...
Plz help.
Thanks
--
pmudINF: How to Remove Duplicate Rows From a Table
http://support.microsoft.com/default.aspx?scid=kb;en-us;139444
AMB
"pmud" wrote:
> Hi,
> My sql table contains duplicate rows & I am trying to delete those but when
> i try to delete or when i try to edit & save the duplicate rows i get the
> error ::" KEY COULMN INFORMATION IS INSUFFICIENT OR INCORERCT.TOO MANY ROWS
> WERE AFFTECTE DBY UPDATE.
> how can i delete these dupliacte rows? I cant even make any column a primary
> key coz there are duplicates...
> Plz help.
> Thanks
> --
> pmud|||hi Alejandro,
My table doesnt have a primary key...so this procedure doesnt fir here...any
other ways to accompliish this?
Thanks
"Alejandro Mesa" wrote:
> INF: How to Remove Duplicate Rows From a Table
> http://support.microsoft.com/default.aspx?scid=kb;en-us;139444
>
> AMB
>
> "pmud" wrote:
> > Hi,
> >
> > My sql table contains duplicate rows & I am trying to delete those but when
> > i try to delete or when i try to edit & save the duplicate rows i get the
> > error ::" KEY COULMN INFORMATION IS INSUFFICIENT OR INCORERCT.TOO MANY ROWS
> > WERE AFFTECTE DBY UPDATE.
> >
> > how can i delete these dupliacte rows? I cant even make any column a primary
> > key coz there are duplicates...
> >
> > Plz help.
> >
> > Thanks
> > --
> > pmud|||You can alter the table and add a primary key column to it first
ALTER TABLE tablename
ADD id INT IDENTITY (1, 1)
"pmud" wrote:
> hi Alejandro,
> My table doesnt have a primary key...so this procedure doesnt fir here...any
> other ways to accompliish this?
> Thanks
> "Alejandro Mesa" wrote:
> > INF: How to Remove Duplicate Rows From a Table
> > http://support.microsoft.com/default.aspx?scid=kb;en-us;139444
> >
> >
> > AMB
> >
> >
> > "pmud" wrote:
> >
> > > Hi,
> > >
> > > My sql table contains duplicate rows & I am trying to delete those but when
> > > i try to delete or when i try to edit & save the duplicate rows i get the
> > > error ::" KEY COULMN INFORMATION IS INSUFFICIENT OR INCORERCT.TOO MANY ROWS
> > > WERE AFFTECTE DBY UPDATE.
> > >
> > > how can i delete these dupliacte rows? I cant even make any column a primary
> > > key coz there are duplicates...
> > >
> > > Plz help.
> > >
> > > Thanks
> > > --
> > > pmud
KEY COULMN INFORMATION IS INSUFFICIENT OR INCORERCT.TOO MANY ROWS
My sql table contains duplicate rows & I am trying to delete those but when
i try to delete or when i try to edit & save the duplicate rows i get the
error ::" KEY COULMN INFORMATION IS INSUFFICIENT OR INCORERCT.TOO MANY ROWS
WERE AFFTECTE DBY UPDATE.
how can i delete these dupliacte rows? I cant even make any column a primary
key coz there are duplicates...
Plz help.
Thanks
pmud
INF: How to Remove Duplicate Rows From a Table
http://support.microsoft.com/default...b;en-us;139444
AMB
"pmud" wrote:
> Hi,
> My sql table contains duplicate rows & I am trying to delete those but when
> i try to delete or when i try to edit & save the duplicate rows i get the
> error ::" KEY COULMN INFORMATION IS INSUFFICIENT OR INCORERCT.TOO MANY ROWS
> WERE AFFTECTE DBY UPDATE.
> how can i delete these dupliacte rows? I cant even make any column a primary
> key coz there are duplicates...
> Plz help.
> Thanks
> --
> pmud
KEY COULMN INFORMATION IS INSUFFICIENT OR INCORERCT.TOO MANY ROWS
My sql table contains duplicate rows & I am trying to delete those but when
i try to delete or when i try to edit & save the duplicate rows i get the
error ::" KEY COULMN INFORMATION IS INSUFFICIENT OR INCORERCT.TOO MANY ROWS
WERE AFFTECTE DBY UPDATE.
how can i delete these dupliacte rows? I cant even make any column a primary
key coz there are duplicates...
Plz help.
Thanks
--
pmudINF: How to Remove Duplicate Rows From a Table
http://support.microsoft.com/defaul...kb;en-us;139444
AMB
"pmud" wrote:
> Hi,
> My sql table contains duplicate rows & I am trying to delete those but whe
n
> i try to delete or when i try to edit & save the duplicate rows i get the
> error ::" KEY COULMN INFORMATION IS INSUFFICIENT OR INCORERCT.TOO MANY ROW
S
> WERE AFFTECTE DBY UPDATE.
> how can i delete these dupliacte rows? I cant even make any column a prima
ry
> key coz there are duplicates...
> Plz help.
> Thanks
> --
> pmud
Key column is insufficient or incorrect. too many rows were affect
When I open table, return all rows using Enterprise Manager and I tried to
edit a column, it returned "Key column is insufficient or incorrect. too man
y
rows were affected by update"
This is a standalone table. No constraint. No formula.
Advice please. TIA !Any reasons to open it in EM?
Do you have any triggers on the table that you modifies to?
If you edit some row , click om another one and see if it worked
Do any modifications thru SP and not by EM
"Desmond" <Desmond@.discussions.microsoft.com> wrote in message
news:51F80698-3DE1-49C7-88A0-093E583DF49F@.microsoft.com...
> Hi,
> When I open table, return all rows using Enterprise Manager and I tried to
> edit a column, it returned "Key column is insufficient or incorrect. too
> many
> rows were affected by update"
> This is a standalone table. No constraint. No formula.
> Advice please. TIA !|||Has the table a primary key defined?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Desmond" <Desmond@.discussions.microsoft.com> wrote in message
news:51F80698-3DE1-49C7-88A0-093E583DF49F@.microsoft.com...
> Hi,
> When I open table, return all rows using Enterprise Manager and I tried to
> edit a column, it returned "Key column is insufficient or incorrect. too m
any
> rows were affected by update"
> This is a standalone table. No constraint. No formula.
> Advice please. TIA !
Key column information is insufficient or incorrect. Too many...
Im trying to Update a table called Contratos in the field Cliente from the table Clientes with the field Cliente.
Im using the follow Trigger :
CREATE TRIGGER UPDate_Clientes ON dbo.Clientes
FOR UPDATE
AS
update Contratos
set Cliente = inserted.Cliente
from Clientes
inner join inserted on Clientes.Cliente = inserted.Cliente
When I update the register the follow message in the application raise :
"Key column information is insufficient or incorrect. Too many rows were affected by update."
What is happen...Can somebody help me?
Leonardo AlmeidaOriginally posted by vectords
Hi,
Im trying to Update a table called Contratos in the field Cliente from the table Clientes with the field Cliente.
Im using the follow Trigger :
CREATE TRIGGER UPDate_Clientes ON dbo.Clientes
FOR UPDATE
AS
update Contratos
set Cliente = inserted.Cliente
from Clientes
inner join inserted on Clientes.Cliente = inserted.Cliente
When I update the register the follow message in the application raise :
"Key column information is insufficient or incorrect. Too many rows were affected by update."
What is happen...Can somebody help me?
Leonardo Almeida
Where is relation between Contratos and Clientes?|||This is the case... I would like to learn the statement that make the relation between these tables.
Why? Cos these are separated in two different databases and if a user make an update in a table from database X these changes must to be applied in the other table in the another database:
The tables are :
Principal Database Name : Server Information 2004
Table Name : Clients
Fields : ID_Client, Client
Secondary Database Name : Index2003
Table Name : Contratos
Fields : ID_Con, ID_Client, Client
I need to write a Trigger for Update the table Contratos everytime a user change the values in Clients.
Im using the follow Trigger :
CREATE TRIGGER UPDate_Clients ON dbo.Clients
FOR UPDATE
AS
update Contratos
set Client = inserted.Client
from Clients
inner join inserted on Clients.Client = inserted.Client
When I update the register the follow message in the application raise :
"Key column information is insufficient or incorrect. Too many rows were affected by update."
If somebody can help me THANKS A LOT OF...
Leonardo Almeida|||Try this one:
CREATE TRIGGER UPDate_Clients ON dbo.Clients
FOR UPDATE
AS
update Contratos
set Client = inserted.Client
from inserted on Contratos.ID_Client = inserted.ID_Client
--------
Only because of Pele|||Originally posted by vectords
This is the case... I would like to learn the statement that make the relation between these tables.
Why? Cos these are separated in two different databases and if a user make an update in a table from database X these changes must to be applied in the other table in the another database:
The tables are :
Principal Database Name : Server Information 2004
Table Name : Clients
Fields : ID_Client, Client
Secondary Database Name : Index2003
Table Name : Contratos
Fields : ID_Con, ID_Client, Client
I need to write a Trigger for Update the table Contratos everytime a user change the values in Clients.
Im using the follow Trigger :
CREATE TRIGGER UPDate_Clients ON dbo.Clients
FOR UPDATE
AS
update Contratos
set Client = inserted.Client
from Clients
inner join inserted on Clients.Client = inserted.Client
When I update the register the follow message in the application raise :
"Key column information is insufficient or incorrect. Too many rows were affected by update."
If somebody can help me THANKS A LOT OF...
Leonardo Almeida
Do every table have a primary key? If no - create primary keys...|||Yes ... each table has the primary key
ID_Client for Clients
ID_Con for Contratos|||This is working:
create table table1(id int primary key,uname varchar(10))
create table table2(id int primary key,id_2 int,uname varchar(10))
go
create trigger i_table1 on table1
for update
as
update table2
set uname=inserted.uname
from inserted where table2.id_2=inserted.id
go
insert table1 select 1,'test'
insert table2 select 1,1,'test'
go
update table1 set uname='test2' where id=1
select * from table1
select * from table2
Try to find error in your script.|||Thank you very much...
Can you send me your e-mail to leonardoalmeida2004@.yahoo.com.br to me give back a return from whats happen to my database I will put this struture you send me in my database and tables
THANK YOU VERY MUCH.
Leonardo Almeida
Key column information is insufficient or incorrect. Too many rows were affected by u
Manish jain
ThanksThe Name Of Allah
hi
In the following table, for example, the error message appears if you attempt to delete one or both of the rows containing "abc" by using SQL Enterprise Manager with the following steps:
1. Right-click on the table.
2. Click on Open table, and then click on Return All Rows.
3. Highlight the rows, and then press the Delete button.
Character_Column1 Character_Column2
abc abc
abc abc
zxy zxy
fgt art
Eng. Maged
key column information is insufficient or incorrect
I have table contain 2000 out of those some are
duplicate when i select duplicate records by using Enterprise Manager
and make modification to one of those duplicate records the following
message flashes/display.
key columen information is insufficient or incorrect.Too many rows were
affected by update
pls suggest what is this and how to solve this problem
Thanks in advance
Dinesh Patwaldinu wrote:
Quote:
Originally Posted by
Dear Friends,
I have table contain 2000 out of those some are
duplicate when i select duplicate records by using Enterprise Manager
and make modification to one of those duplicate records the following
message flashes/display.
>
key columen information is insufficient or incorrect.Too many rows were
affected by update
>
pls suggest what is this and how to solve this problem
>
Thanks in advance
>
Dinesh Patwal
Before you can edit the data in Enterprise Manager you need to add a
unique constraint or unique index. To facilitate that it may help to
use SELECT DISTINCT to eliminate duplicates and copy the data to a new
table. It rather depends on just how you want to eliminate the
duplicate data. You can Google for lots of previous posts on this topic
in this group and in the microsoft.public.sqlserver groups.
--
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/...US,SQL.90).aspx
--
Key column information is insufficient of incorrect....
delete all but two of them. I noticed the two records
have identical info. I am getting the following message:
Key Column information is insufficient of incorrect. Too
many rows were affected by update.
Please help
in query analyzer issue a set rowcount 1, then delete the record.
Hilary Cotter
Looking for a book on SQL Server replication?
http://www.nwsu.com/0974973602.html
"Diane" <anonymous@.discussions.microsoft.com> wrote in message
news:1b72c01c44ff1$f8ab3920$a401280a@.phx.gbl...
> I am trying to delete all records from a table and could
> delete all but two of them. I noticed the two records
> have identical info. I am getting the following message:
> Key Column information is insufficient of incorrect. Too
> many rows were affected by update.
> Please help
Key column information is insufficient ....II
This is the case... I would like to learn the statement that make the
relation between these tables.
Why? Cos these are separated in two different databases and if a user
make an update in a table from database X these changes must to be
applied in the other table in the another database:
The tables are :
Principal Database Name : Server Information 2004
Table Name : Clients
Fields : ID_Client, Client
Secondary Database Name : Index2003
Table Name : Contratos
Fields : ID_Con, ID_Client, Client
I need to write a Trigger for Update the table Contratos everytime a
user change the values in Clients.
Im using the follow Trigger :
CREATE TRIGGER UPDate_Clients ON dbo.Clients
FOR UPDATE
AS
update Contratos
set Client = inserted.Client
from Clients
inner join inserted on Clients.Client = inserted.Client
When I update the register the follow message in the application raise :
"Key column information is insufficient or incorrect. Too many rows were
affected by update."
If somebody can help me THANKS A LOT OF...
Leonardo Almeida
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!"Leonardo Almeida" <leonardoalmeida2004@.yahoo.com.br> wrote in message
news:3f674b6d$0$62079$75868355@.news.frii.net...
>
> This is the case... I would like to learn the statement that make the
> relation between these tables.
> Why? Cos these are separated in two different databases and if a user
> make an update in a table from database X these changes must to be
> applied in the other table in the another database:
> The tables are :
> Principal Database Name : Server Information 2004
> Table Name : Clients
> Fields : ID_Client, Client
> Secondary Database Name : Index2003
> Table Name : Contratos
> Fields : ID_Con, ID_Client, Client
> I need to write a Trigger for Update the table Contratos everytime a
> user change the values in Clients.
> Im using the follow Trigger :
> CREATE TRIGGER UPDate_Clients ON dbo.Clients
> FOR UPDATE
> AS
> update Contratos
> set Client = inserted.Client
> from Clients
> inner join inserted on Clients.Client = inserted.Client
> When I update the register the follow message in the application raise :
> "Key column information is insufficient or incorrect. Too many rows were
> affected by update."
> If somebody can help me THANKS A LOT OF...
> Leonardo Almeida
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!
See my reply to your previous post.
Simon|||Leonardo Almeida (leonardoalmeida2004@.yahoo.com.br) writes:
> I need to write a Trigger for Update the table Contratos everytime a
> user change the values in Clients.
> Im using the follow Trigger :
> CREATE TRIGGER UPDate_Clients ON dbo.Clients
> FOR UPDATE
> AS
> update Contratos
> set Client = inserted.Client
> from Clients
> inner join inserted on Clients.Client = inserted.Client
> When I update the register the follow message in the application raise :
> "Key column information is insufficient or incorrect. Too many rows were
> affected by update."
Include a SET NOCOUNT ON first in the trigger. If that does not help,
remove the trigger and run the update again. I would expect in such
case that you get the error anyway. Which would indicate that the error
is in the client code which you did not show us.
--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||What code are you talking about?
In the client code I use Delphi + ADO
ADOTable1.Open;
ADOTable1.Edit;
Now edit the Client registrer
Post the register with the command:
ADOTable1.Post;
The message arise again...
and each table has a primary key...
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!|||Leonardo Almeida (leonardoalmeida2004@.yahoo.com.br) writes:
> What code are you talking about?
The SET NOCOUNT ON command should be added to your trigger.
> In the client code I use Delphi + ADO
> ADOTable1.Open;
> ADOTable1.Edit;
> Now edit the Client registrer
> Post the register with the command:
> ADOTable1.Post;
> The message arise again...
> and each table has a primary key...
There is no .Post method in ADO, so I conclude that this is something
Delphi-specific, and I don't know Delphi.
If SET NOCOUNT ON did not help, I can only suggest to use the Profiler
to see what is going on behind the covers.
--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||Hi Leonardo,
Your trigger doesn't look correct to me! Why are you using Clients
table in your trigger? In order to update Contratos table using new
values in Clients, you need to use inserted table not Clients.
Something like this:
create trigger Update_Clients on Clients
for update
as
update Contratos
set Client = inserted.Client
from Contratos join inserted
on Contratos.ID_Client = inserted.ID_Client
In your current trigger, you are dealing with 3 tables (Contratos,
Clients & inserted) without joining them correctly. So when you try to
update Client field of Contratos table, it finds more than one value
in inserted table which causes that problem.
I hope this one works fine. I didn't test it...
Good Luck,
Shervin
Leonardo Almeida <leonardoalmeida2004@.yahoo.com.br> wrote in message news:<3f674b6d$0$62079$75868355@.news.frii.net>...
> This is the case... I would like to learn the statement that make the
> relation between these tables.
> Why? Cos these are separated in two different databases and if a user
> make an update in a table from database X these changes must to be
> applied in the other table in the another database:
> The tables are :
> Principal Database Name : Server Information 2004
> Table Name : Clients
> Fields : ID_Client, Client
> Secondary Database Name : Index2003
> Table Name : Contratos
> Fields : ID_Con, ID_Client, Client
> I need to write a Trigger for Update the table Contratos everytime a
> user change the values in Clients.
> Im using the follow Trigger :
> CREATE TRIGGER UPDate_Clients ON dbo.Clients
> FOR UPDATE
> AS
> update Contratos
> set Client = inserted.Client
> from Clients
> inner join inserted on Clients.Client = inserted.Client
> When I update the register the follow message in the application raise :
> "Key column information is insufficient or incorrect. Too many rows were
> affected by update."
> If somebody can help me THANKS A LOT OF...
> Leonardo Almeida
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!
Key column information is insufficient ....
This is the case... I would like to learn the statement that make the
relation between these tables.
Why? Cos these are separated in two different databases and if a user
make an update in a table from database X these changes must to be
applied in the other table in the another database:
The tables are :
Principal Database Name : Server Information 2004
Table Name : Clients
Fields : ID_Client, Client
Secondary Database Name : Index2003
Table Name : Contratos
Fields : ID_Con, ID_Client, Client
I need to write a Trigger for Update the table Contratos everytime a
user change the values in Clients.
Im using the follow Trigger :
CREATE TRIGGER UPDate_Clients ON dbo.Clients
FOR UPDATE
AS
update Contratos
set Client = inserted.Client
from Clients
inner join inserted on Clients.Client = inserted.Client
When I update the register the follow message in the application raise :
"Key column information is insufficient or incorrect. Too many rows were
affected by update."
If somebody can help me THANKS A LOT OF...
Leonardo Almeida
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!Hey Leonardo;
I noticed that there are no replies...I am getting exactly the same
error but cannot find a solution, nor a workaround. What did you
finally wind up doing? Please reply to my email directly rtodd@.metro.ca
I have similar triggers, they all work when I update my tables directly
in SQL Server. When I move to my ACCESS ADP and perform the same
updates directly in the same table, I get the same error message.
If anyone can help us....please do !
--
Posted via http://dbforums.com