General information
Forum:
Microsoft SQL Server
Yep,
You can pass an expression to an SP, I don't know why, it just doesn't like it! Change your code, and it will work fine!
IF UPDATE(myfield)
BEGIN
declare @secondfield typehere
set @secondfield = (SELECT mySecondField FROM INSERTED)
EXECUTE myStoredProc 1, @secondfield
END
>Hi,
>
>Anyone has made somthing like this, on a INSERT trigger:
>
>IF UPDATE(myfield)
>BEGIN
> EXECUTE myStoredProc 1, (SELECT mySecondField FROM INSERTED)
>END
>
>
>SQL Server return error at the "(".
>
>Any ideas?
>
>Thanks,
>
>Ricardo
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only