Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Trigger on Update

Author  Topic 

iminore
Posting Yak Master

141 Posts

Posted - 2005-01-11 : 07:19:12
the code:

set @guid = (select guid from INSERTED)

is giving error 'Subquery returned more than 1 value.'

I thought the INSERTED table was a single record table relating to just that update.

???

LarsG
Constraint Violating Yak Guru

284 Posts

Posted - 2005-01-11 : 08:49:29
An update or insert may affect more than one row. The INSERTED table contains all affected rows.
Go to Top of Page

iminore
Posting Yak Master

141 Posts

Posted - 2005-01-11 : 09:04:36
Rereading Books Online I can see that you are right. Hmmm. Thanks for that.
Go to Top of Page

Bustaz Kool
Master Smack Fu Yak Hacker

1834 Posts

Posted - 2005-01-11 : 11:49:10
Books Online...(Sigh) Is there anything that it doesn't know? ;-)

HTH

=================================================================

Scriptures, n. The sacred books of our holy religion, as distinguished from the false and profane writings on which all other faiths are based.
-Ambrose Bierce, writer (1842-1914) [The Devil's Dictionary]
Go to Top of Page
   

- Advertisement -