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 |
|
Ragabash
Starting Member
6 Posts |
Posted - 2008-01-28 : 09:40:19
|
| ALTER Function [dbo].[find_role](@kul_no as int)Returns nvarchar(50)AS BEGIN declare @role_no as int set @role_no = (Select gorev_no from r_employee where emplyee_id=@user_no ) declare @role_name as nvarchar(50) set @role_name=(Select role_explanation from Tasks where role_no=@role_no) Return @role_name ENDhow can I execute this function? |
|
|
jhocutt
Constraint Violating Yak Guru
385 Posts |
Posted - 2008-01-28 : 09:43:33
|
| declare @rc as varchar(50)exec @rc = dbo.find_role 1print @rc"God does not play dice" -- Albert Einstein"Not only does God play dice, but he sometimes throws them where they cannot be seen." -- Stephen Hawking |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-01-28 : 09:43:46
|
| Select dbo.find_role(10) -- or other numberMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|