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 |
|
kiranmurali
Yak Posting Veteran
55 Posts |
Posted - 2010-07-14 : 07:13:59
|
| how to write a function to return muliple values and how to call that func in stored procedure in SQL SERVER 2008.THANKS IN ADVANCE |
|
|
bklr
Master Smack Fu Yak Hacker
1693 Posts |
Posted - 2010-07-14 : 08:19:05
|
| [code]CREATE FUNCTION dbo.udf_test( @Id INT = NULL)RETURNS @result TABLE ( EmployeeId INT, EmployeeName VARCHAR(256) )ASBEGIN INSERT INTO @result SELECT employeeid, EmpName, desgination FROM employeetable where employeeid = @id RETURNENDcreate proc dbo.usp_testproc(@id int) asSET NOCOUNT ONBEGINSELECT * FROM dbo.udf_test(@id)ENDSET NOCOUNT OFF[/code] |
 |
|
|
|
|
|