Alex Rivera | Logout

Execute a SQL stored proc from a SQL view

Asked 2008-12-08T16:05:24.403
11

I am finding that calling a stored proc in Excel is not as easy as it should be, but calling a view, or a direct table is very easy. So, how can I create a view that will call a stored proc with no params?

I know I won't be able to pass any values into the view, and I don't need or want to, Just want to wrap a stored proc in a view.

something like select exec MyStoredProc() would be great.

Edit
Report

1 Answer

11

iirc (I don't have a copy to hand) if you happen to be in T-SQL it should be possible to select * from a user defined table function (which are for most intents and purposes identical to sprocs) which returns a table variable.

answered 2008-12-08T16:18:58.667

Your Answer