Re: Error on Trigger Launch



On Tue, 26 Feb 2008 06:34:02 -0800 (PST), pyrahna wrote:

I get the following error when i try to update a table with the a
trigger (trigger script below),
"Error Message: The row value(s) updated or deleted either do not make
the row unique or they alter multiple rows(3 rows)"

Hi pyrahna,

That does not sound like a SQL Server error message. But rather like a
message generated by your front end. Many front end programs can get
confused when triggers modify data. This message sounds like such an
issue.

However, I saw a different problem with your trigger:

(snip)
Select @ecr_id = ecr_id, @r_d_release = rd_approval,
@production_release = prod_approval
from inserted

If an UPDATE statement affects multiple rows, this will cause one (more
or less at random) of them to be processed. The others will be ignored
by your trigger. I don't think that is what you want!

--
Hugo Kornelis, SQL Server MVP
My SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis
.



Relevant Pages

  • Re: How to syncronize two tables?
    ... What is the error message? ... Pro SQL Server 2000 Database Design - ... > want to sync them with trigger. ...
    (microsoft.public.sqlserver.programming)
  • Re: Error on Trigger Launch
    ... It was an error message from Microsoft SQL Server Managment Studio ... trigger, ... If an UPDATE statement affects multiple rows, ...
    (comp.databases.ms-sqlserver)
  • Re: help with DDL trigger. Moved from other newsgroup.
    ... something about this trigger causes a prior table "tblA" to ... Here is the error message that I get on inserting into tblA with the ... you use XQuery, these settings must be on: ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ...
    (comp.databases.ms-sqlserver)
  • Re: NEED TO CALL AS400 S.P
    ... That is to use a trigger on a table and perform an INSERT/UPDATE which will execute the trigger. ... What an error message! ... > what your OLE DB provider is feed the AS400 with? ... > Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se ...
    (microsoft.public.data.oledb)
  • Re: using a trigger to enforce referential integrity
    ... The first thing to do is COMPLETELY and EXACTLY specify the error message ... Lets avoid "something like..." ... you can then move on to rewriting your trigger to ... FROM tblItemRelationship AS IR ...
    (microsoft.public.sqlserver.programming)

Loading