Dec 15 2023 06:05 AM
Greetings!
I am relatively new to SQL and have just written my first stored procedure. My goal is to create a Job that runs this procedure, but I am running into some issues. The procedure takes no parameters and when I execute, the default execution script returns the result table (which is all I want) but also a 'Return Value' (which I do not want). When I manually remove the: SELECT 'Return Value' =@return_value from the default execution script, I get the desired result. How can I make this change prior to execution and make it permanent so that I can run this as a Job and always get my intended outcome?
Dec 17 2023 10:09 PM
@Rich_Beverungen Use a simple EXEC command, like
EXEC spYourProcedure;