Accessing a stored procedure in a SELECT statement.

  • 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?

  • No, if you need the select to have parameters, then transform the proc into a table function, otherwhise just make it a view.

  • 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).

  • Can we see the code of the sp please?

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply