October 17, 2012 at 12:12 am
Hi Guys,
I know, the question is Funny, but i want to know the details of stored procedures and UDF
I have created a Stored Procedure, i want to use the sp as like UDF
Means a UDF can be use as like "Table" we can create Joins and select a particular field,
same like UDF i want to make a use of Stored Procedure will it be Possible
if yes please provide some article for further studies
Thanks
Patel Mohamad
October 17, 2012 at 12:17 am
No. You cannot use a Stored Procedure like a UDF.
You can insert the results from a Stored Procedure into a temporary table and work on the temporary table further.
How to post data/code on a forum to get the best help - Jeff Moden
http://www.sqlservercentral.com/articles/Best+Practices/61537/
October 17, 2012 at 12:21 am
Kingston Dhasian (10/17/2012)
No. You cannot use a Stored Procedure like a UDF.You can insert the results from a Stored Procedure into a temporary table and work on the temporary table further.
Hi Kingston,
I am creating some documents on Store procedure and UDF , so i need theoretical description why we can not use stored procedure as UDF
Can you please provide some article or any document for further studies
Thanks
Patel Mohamad
October 17, 2012 at 12:27 am
patelmohamad (10/17/2012)
Kingston Dhasian (10/17/2012)
No. You cannot use a Stored Procedure like a UDF.You can insert the results from a Stored Procedure into a temporary table and work on the temporary table further.
Hi Kingston,
I am creating some documents on Store procedure and UDF , so i need theoretical description why we can not use stored procedure as UDF
Can you please provide some article or any document for further studies
Thanks
I am not sure if I can get any documents based on this. I will have to Google it.
I will update the thread with links if I get one.
I could get only the below link from Google
http://social.msdn.microsoft.com/Forums/en/transactsql/thread/e699e6b9-09a5-447c-b44f-f559bff03c33
Here, the Microsoft person gives 2 reasons for the limitation
How to post data/code on a forum to get the best help - Jeff Moden
http://www.sqlservercentral.com/articles/Best+Practices/61537/
October 18, 2012 at 4:40 pm
Maybe this can help litle bit, but is not exactly what you ask for.
October 25, 2012 at 4:15 am
patelmohamad (10/17/2012)
I have created a Stored Procedure, i want to use the sp as like UDF Means a UDF can be use as like "Table" we can create Joins and select a particular field,same like UDF
Any specifc reasons for it ? performance issues ??
-------Bhuvnesh----------
I work only to learn Sql Server...though my company pays me for getting their stuff done;-)
October 26, 2012 at 8:02 am
You cannot interchange UDFs and sprocs. They can be similar if they both output a variable, but you cannot "join" to the tabular output of a sproc.
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply