I’m wondering if its possible to execute a stored procedure in an update statement in TSQL.
I want to execute a stored procedure that will set the CategoryID for the number table, passing in the number from the row the update statement is currently on.
So something like:
UPDATE [TelephoneNumberManagement].[dbo].[Number]
SET [CategoryID] = exec goldennumbers2 [Number];
No.
You could do this if it were a function:
Just keep in mind that a function can’t have side-effects. If you’re trying to run a bunch of DML statements in that procedure you should:
Numbertable. Even so you might want to…