bclubb wrote:
Quick question. Why would you not use a stored procedure for this?
The primary reason why I like a udf that returns a table over a stored procedure is that a udf can be queried like a table where a stored procedure cannot. I can't say select * from storedprocedure where something = something. This functionality makes a udf a lot easier to use. I would just say in the end the a udf is more easily re-used the a stored procedure is. Maybe I'm wrong, but I have had a number of occasions where the stored procedure just didn't work out very well and a udf did.
I wonder why a udf that returns a table isn't handled just like a stored procedure by LLBLGen as I would expect it to return a datatable just like a stored procedure.
Aaron