How to define in sql server the same parameter as input and output both

Please support our MS SQL advertiser: Intel Parallel Studio Home
Reply

Join Date: May 2006
Posts: 13
Reputation: Swapnil Palande is an unknown quantity at this point 
Solved Threads: 0
Swapnil Palande Swapnil Palande is offline Offline
Newbie Poster

How to define in sql server the same parameter as input and output both

 
0
  #1
Jul 26th, 2006
Hi all,

Please help me in solving following query.

Can we define in sql server the same parameter as input and output?

How to do it?

Thanks and regards,

Swapnil.
Reply With Quote Quick reply to this message  
Join Date: May 2006
Posts: 13
Reputation: Swapnil Palande is an unknown quantity at this point 
Solved Threads: 0
Swapnil Palande Swapnil Palande is offline Offline
Newbie Poster

Re: How to define in sql server the same parameter as input and output both

 
0
  #2
Jul 26th, 2006
Hi All,

I have got the solution:

--objects
create proc usp1 @num int output as
set @num = @num + 1
go

--calculation
declare @num int
set @num = 7
exec usp1 @num output
select @num

--tidy
drop proc usp1
/*results
-----------
8
*/
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the MS SQL Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC