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
 General SQL Server Forums
 New to SQL Server Programming
 Question regarding SP

Author  Topic 

nicky_river
Yak Posting Veteran

55 Posts

Posted - 2010-07-30 : 08:11:43
Hi Everyone,

Can a stored procedure be called inside a function ? If yes, then how ? and if no, then why no ?

Can a stored procedure be called inside a view ? If yes, then how ? and if no, then why no ?

Kristen
Test

22859 Posts

Posted - 2010-07-30 : 08:16:43
No, not really, on both counts. There are bodges to work around this by using OPENROWSET or somesuch to get an external connection back to the server/database, but it is not recommended.
Go to Top of Page

nicky_river
Yak Posting Veteran

55 Posts

Posted - 2010-07-30 : 08:58:47
Hi Kristen,

Could you tell me why using OPENROWSET is not recommended ?
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2010-07-30 : 09:15:53
Cumbersome, probably inefficient, but mostly because it makes the function nondeterministic.

Best to solve your problem a different way.
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2010-07-30 : 09:28:04
Pretty ambiguous post...

Is this for a Class test or interview?

Or do you really need to get something done?



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page
   

- Advertisement -