Re: Mass Update on Table with Trigger
- From: Erland Sommarskog <esquel@xxxxxxxxxxxxx>
- Date: Fri, 29 Jun 2007 21:29:29 +0000 (UTC)
(paulmac106@xxxxxxxxx) writes:
I need to update a field in about 20 records on a table. The table has
an update trigger (which updates the [lastedited] field whenever a
record is updated). As a result I'm getting an error: "Subquery
returned more than 1 value.", and the update fails.
Is there a way in the stored procedure to handle this issue?
If you are not able to correct the trigger, you will have to run a
cursor to updaet one row at a time. But obviously that should be a very
last resort.
--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
.
- References:
- Mass Update on Table with Trigger
- From: paulmac106
- Mass Update on Table with Trigger
- Prev by Date: Re: XML INTO SQL
- Next by Date: Re: Connecting to SQL 2005 using VB6
- Previous by thread: Mass Update on Table with Trigger
- Index(es):
Relevant Pages
|