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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 User-defined function

Author  Topic 

daquoc
Starting Member

35 Posts

Posted - 2005-10-12 : 22:38:38

Hi all experts,

I created a function which calls a store procedure but the error raised "Only functions and extended stored procedures can be executed from within a function". Is there any solution to solve this problem.
The problem is that I couldn't merge all those store procedures in the function. My focus is returning a table that can be displayed in a report.

Thank so much. Have a nice working day.

daquoc










madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-10-13 : 01:04:29
Use the code used in the sp inside Function

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

eyechart
Master Smack Fu Yak Hacker

3575 Posts

Posted - 2005-10-13 : 02:51:15
As you found out you cannot exec a sproc from inside a UDF. I think a inline table valued function might do exactly what you want. Here is a good article that details their capabilities (and limitations) http://www.sqlteam.com/item.asp?ItemID=1955



-ec
Go to Top of Page
   

- Advertisement -