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 |
|
jesus4u
Posting Yak Master
204 Posts |
Posted - 2002-08-23 : 10:39:03
|
I am calling a SP from within another SP and using this statement to ge the RoleID into the variable. When I debug it doens't return the RoleID. The code is going into the called SP.SELECT @RoleID as RoleID exec dbo.db_GetUserRole @ChatRoomId , @Uid |
|
|
jasper_smith
SQL Server MVP & SQLTeam MVY
846 Posts |
Posted - 2002-08-23 : 13:26:41
|
| exec dbo.db_GetUserRole @ChatRoomId , @Uid, @RoleID = @RoleID OUTPUTHTHJasper Smith |
 |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2002-08-24 : 17:57:36
|
| And the called sp has to be declared ascreate procedure db_GetUserRole@ChatRoomId int ,@UID int ,@RoleID int outputasyou don't need the identifier on the callexec dbo.db_GetUserRole @ChatRoomId , @Uid, @RoleID output will do.If you are trying to return the RoleID as a return code (not a good idea) thenexex @RoleID = exec db_GetUserRole @ChatRoomId , @Uid==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
|
|
|