Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 run job with SP with parametr

Author  Topic 

nord
Posting Yak Master

126 Posts

Posted - 2012-04-26 : 11:06:51
Hi!
I have SP with 3 parametr,how I can run job, I wrote like: EXEC [dbo].[RwSP_TransferOpProduct]111,but doesn't work
Thanks

nord
Posting Yak Master

126 Posts

Posted - 2012-04-26 : 11:34:10
Hi,
I have 2 parametr input and 1 parametr output:
ALTER procedure [dbo].[RwSP_TransferOpProduct] @batch_seq int, @activity_seq int, @return_value int OUTPUT
Thanks
Go to Top of Page

sunitabeck
Master Smack Fu Yak Hacker

5155 Posts

Posted - 2012-04-26 : 11:50:38
In SSMS Object explorer, if you expand the nodes to see the stored proc, right-click and select Script Stored procedure as -> Execute To -> New Query Editor window, it will show you a query editor window with the right syntax. This is sort of what it will look like (and what you need to do).
DECLARE @RC int
DECLARE @batch_seq int
DECLARE @activity_seq int
DECLARE @return_value int

-- TODO: Set parameter values here.

EXECUTE @RC = [PFW].[dbo].[RwSP_TransferOpProduct]
@batch_seq
,@activity_seq
,@return_value OUTPUT

SELECT @return_value;
Go to Top of Page

nord
Posting Yak Master

126 Posts

Posted - 2012-04-26 : 15:47:42
Thanks
Go to Top of Page
   

- Advertisement -