I've written a stored procedure which returns a set of records. Is it possible to wrap this stored procedure in a view so that it can appear in the FROM clause of a SELECT statement?
Thats all well and good, but what if the returned table's definition depends on the arguments to the function? (i.e. I only know the set of fields at execution time).