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.
| Author |
Topic |
|
missMac
Posting Yak Master
124 Posts |
Posted - 2009-04-29 : 12:44:37
|
| hello guys,i have an SP as thusALTER procedure [dbo].[prices_calculator] (@calculator INT, @return varchar(2000) output).... return @returnIf i execute the above sp in another sp or in the query window, how do i get the return value into a variable.thanks |
|
|
Skorch
Constraint Violating Yak Guru
300 Posts |
Posted - 2009-04-29 : 13:00:43
|
| If I recall correctly you can just do this:SELECT @YourVariable = [dbo].[prices_calculator] 1 (or whatever other int value you want to pass to the prices_calculator proc)Some days you're the dog, and some days you're the fire hydrant. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-04-29 : 13:37:13
|
if you want to retrieve the output variables value outside you can do it like thisDECLARE @RetVal varchar(2000)EXEC [dbo].[prices_calculator] first value here,@RetVal outputSELECT @RetVal |
 |
|
|
missMac
Posting Yak Master
124 Posts |
Posted - 2009-04-29 : 18:07:21
|
| thanks guys |
 |
|
|
|
|
|