------ "There's a man... He's bald and wears a short-sleeved shirt, and somehow he's very important to me. I think his name is Homer."
(Jack O'Neill, Stargate)
EXISTS() is not necessary - either INSERT happens (and trigger fires) or not.
Multirow inserts are not a problem, as long as there is unique/primary key to catch on (unique_id).
------ "There's a man... He's bald and wears a short-sleeved shirt, and somehow he's very important to me. I think his name is Homer."
(Jack O'Neill, Stargate)
I don't think you can. I believe you have to grab the value from the Inserted row and update the table based on some unique ID from the Inserted row. That is what nomadicalloy and vongrunt are trying to point out
my problem is that when i create the trigger with the line
where unique_id in (select unique_id from inserted)
i get an error....
Server: Msg 207, Level 16, State 3, Procedure joe, Line 8
Invalid column name 'unique_id'.
Server: Msg 207, Level 16, State 1, Procedure joe, Line 8
Invalid column name 'unique_id'.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.