C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » SQL Server »

Can i call a stored procedure in a function


Posted Date: 06 Nov 2009      Posted By: pavan      Member Level: Bronze     Points: 1   Responses: 6



can i call a stored procedure in a function


v v v urgent...






Responses

Author: ABitSmart    06 Nov 2009Member Level: DiamondRating: 2 out of 52 out of 5     Points: 2

No, you cannot.

Kind regards,
ABitSmart
DNS Web-master, DNS MVM
My blog
Thoughts.exe



Author: pradeep kumar reddy    06 Nov 2009Member Level: SilverRating: 2 out of 52 out of 5     Points: 2

hi
function and stored procedure are similar except some small differences.
we cannot call a stored procedure inside a function



Author: Hari    06 Nov 2009Member Level: GoldRating: 2 out of 52 out of 5     Points: 2

Inside a function you can not modify data and can not execute stored procedure. that's because the servers needs to assume that the state of the DB and data will not change by calling the function (again, by design because the server would basically need to recompile the queries after each call to the function... which happens on every rows in the select). If you need to do such modifications, it needs to be done inside a proc.


Author: Nikhil Gaur    06 Nov 2009Member Level: DiamondRating: 2 out of 52 out of 5     Points: 2

I can't understand why all are saying that we can not call stored procedure through function. It is possible. Yes, you can call it through function. find how here

http://www.dreamincode.net/forums/showtopic79651.htm

Join this campus group
http://www.dotnetspider.com/sites/637/-ecb-aspdotnet.aspx

Thanks & Regards
NIks
My Software and Web Development Experience



Author: ABitSmart    08 Nov 2009Member Level: DiamondRating: 2 out of 52 out of 5     Points: 2

Nikhil Gaur, This is an SQL question. You cannot call an SQL Stored procedure from SQL function. You are confused. The link has no relation to the question.

Kind regards,
ABitSmart
DNS Web-master, DNS MVM
My blog
Thoughts.exe



Author: Bunty    09 Nov 2009Member Level: DiamondRating: 2 out of 52 out of 5     Points: 2

Hi,

No, you cannot call a stored procedure from a function but you can call a function from a stored procedure.


Thanks & Regards
S.S.Bajoria



Post Reply
You must Sign In to post a response.
Next : Create Table
Previous : Oracle Certification.
Return to Discussion Forum
Post New Message
Category: SQL Server

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use