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 |
gagani
Posting Yak Master
112 Posts |
Posted - 2013-03-11 : 18:18:30
|
I need call the stored procedure into a table valued function(stored procedure will return a table)Create Function dbo.Function1() Returns @Result Table(Result Varchar(1000))AsBegin Insert @Result SELECT * from 'Exec dbo.crosstab' // HOW TO CALL THE STORED PROCEDURE RESULTS INTO THE FUNCTION ReturnendGo |
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2013-03-11 : 22:43:25
|
You can't execute procedures or dynamic SQL inside a user-defined function. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-03-12 : 01:20:27
|
you can do the inverse though...ie calling udf inside stored procedure------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
|
|
|