dbTalk Databases Forums  

Call store procedure from function

comp.databases.ms-sqlserver comp.databases.ms-sqlserver


Discuss Call store procedure from function in the comp.databases.ms-sqlserver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Fabio
 
Posts: n/a

Default Call store procedure from function - 11-13-2007 , 05:01 AM






Hi,

is there any method to call a store procedure into a function?

Thanks

Fabio


Reply With Quote
  #2  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: Call store procedure from function - 11-13-2007 , 09:03 AM






Fabio (fabio.gagno (AT) gmail (DOT) com) writes:
Quote:
is there any method to call a store procedure into a function?
No, you cannot call stored procedures from function. Functions must not
change database state. Overall, functions are intended for a fairly
limited use, and if you find that you need to call a stored procedure
from your function, you should probably write a stored procedure instead.


--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.