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 |
|
robertc
Starting Member
7 Posts |
Posted - 2007-11-17 : 00:05:32
|
| I've yet to figure this out. But I tend to test my stored procs in the query window from time to time.Some of these have output parameters, so when i'm trying to run the sproc it asks me to supply the output parameters which I find odd since i'm hoping to get something back rather than setting a value for them.Does anyone know the syntax that will enable to me to run my sproc and view the results as well as the values of output Parameters?CheersRob |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2007-11-18 : 00:49:50
|
| HiThis can be done as followssuppose you have a sp which is like thisCreate Proc MyProc AS@Param1 int @Param2 varchar(10) OUTPUT....code...You can invoke the sp and get output variable value as followsDeclare @Var varchar(10) --this is for getting back sp return valueExec MyProc {value of @Param1},@Var OUTPUTSelect @Var as 'Return Value'and you will get return value of OUPUT param in query windowplzz note that the data type compatibility of user variable and output parameter. |
 |
|
|
|
|
|