SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 run job with SP with parametr
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

nord
Yak Posting Veteran

66 Posts

Posted - 04/26/2012 :  11:06:51  Show Profile  Reply with Quote
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
Yak Posting Veteran

66 Posts

Posted - 04/26/2012 :  11:34:10  Show Profile  Reply with Quote
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
Flowing Fount of Yak Knowledge

5152 Posts

Posted - 04/26/2012 :  11:50:38  Show Profile  Reply with Quote
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
Yak Posting Veteran

66 Posts

Posted - 04/26/2012 :  15:47:42  Show Profile  Reply with Quote
Thanks
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000