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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2004-05-20 : 09:14:49
|
| Shantanu writes "I have a stored procedure and I like to call this from select statement.This stored procedure returns Description about the code passed to procedure RejectDesc recordset by select command inside.How to call a stored procedure like below:declare @RejDesc varchar(20) select ID, (exec RejectDesc CODE,@Desc=@RejDesc output) as namefrom TransTrans Table have two fields1)ID2)CODEthank in advance" |
|
|
raymondpeacock
Constraint Violating Yak Guru
367 Posts |
Posted - 2004-05-20 : 09:29:15
|
| You cant use stored procedures in this way. For something as straightforward as getting a description change your stored proc to a user-defined function instead and call the function in the select statement.Raymond |
 |
|
|
|
|
|