Quote Originally Posted by kaffenils
A lot of information has already been given, but I would also like to mention one difference between SP and UDF that I find useful. A UDF that return a table data type can be used as a recordset in select statements (select * from dbo.fn_myfunction) and can therefore be a good alternative to views since you can do much more in a UDF than you can do in a view.
Could you show a sample please of how you start the UDF off, so that we can see how you indicate a return value of a TABLE?