[dba-SQLServer] Run a sproc within a select statement

Michael Brosdorf michael.broesdorf at web.de
Fri Jun 25 03:06:15 CDT 2004


Dear group,

within a trigger I need to run a stored procedure for every record in the
inserted/deleted tables.
I would like to avoid using a cursor to touch the records one by one. A
while ago I saw a pretty tricky solution
for that problem where the sproc was run from inside the select statement
(afair it looked almost like the
'select @intID=MyID from Mytable'-syntax for assigning a value to variable).
Unfortunately I cannot remember, where that was.

Any hints?

Michael





More information about the dba-SQLServer mailing list