July 25, 2006 at 11:58 pm
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.
July 26, 2006 at 1:20 am
Did you hear about the magic and power of knowledge hidden behind the key {F1}?
_____________
Code for TallyGenerator
July 26, 2006 at 1:31 am
Friend, I had tried it but could not get the answer, that is why I have post question over here. If you know the answer please post it for me.
July 26, 2006 at 1:57 am
OK, start exersise from the beginning.
Being in EM or QA press {F1}.
In Index tab type "output parameters".
Press Enter.
In the list appeared find "Returning values using OUTPUT parameters".
Select it and press OK.
Is it what you are looking for?
Is it rocket science?
_____________
Code for TallyGenerator
July 26, 2006 at 2:59 am
I think you are not getting my quetion.
My question is, How to define same parameter as input and output both.
for ex. Suppose I have a '@num int' parameter in my stored procedure. How can I define the same (i.e. @num) as input parameter and output parameter both.
I know how to define input parameter and output parameter separately. But I don't know how to define same parameter as input as well as output both.
I hope you got it.
July 26, 2006 at 3:33 am
There are no output only parameters.
OUTPUT parameter is INPUT as well.
Just dare to use it.
_____________
Code for TallyGenerator
July 26, 2006 at 4:45 am
Here's an example, Swapnil,
--objects
create proc #sp1 @x int output as
set @x = @x + 1
go
--calculation
declare @x int
set @x = 7
exec #sp1 @x output
select @x
--tidy
drop proc #sp1
/*results
-----------
8
*/
Please forgive Sergiy's bitterness. He means well...
Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
July 26, 2006 at 5:08 am
Thanks Rayan,
Thanks very much for help.
Regards,
Swapnil.
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply