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 |
tuzijatek
Starting Member
2 Posts |
Posted - 2009-08-23 : 11:17:03
|
Hi All!I would like to do a stored procedure likeDECLARE @key NVARCHAR(200)EXEC myproc @input='blabla', @output=@key OUTPUTSELECT * FROM mytable WHERE id=@keyThe problem is that the execution of this procedure gives back 2 recordsets. The first gives the value of @val, the second gives the result of the select. Is there a way do this task, that gives back only the second recordset? In other words, how to give value to a variable through a stored procedure that does not produce a recordset? |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-09-02 : 06:59:04
|
I dont think there is a way to get second recordset using sql. You can do this via front end applicationMadhivananFailing to plan is Planning to fail |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-09-02 : 08:38:18
|
sorry your question is not clear. so you want to suppress resultset and get only variable value? |
|
|
tuzijatek
Starting Member
2 Posts |
Posted - 2009-09-03 : 06:30:09
|
mandhivanan,the problem is that I dont want the "EXEC myproc ..." to give a result recordset, instead I want it to actsomething like: SET @key=.... statement.visakh16,Yes, exactly! |
|
|
|
|
|