Create Table based off SPROC

LCNW
LCNW used Ask the Experts™
on
I have a front end web part in SharePoint that only pulls from tables or views. The problem is, the data comes from a SPROC.

How can I call the SPROC from a view or table and how will the view/table stay updated?

Thanks.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
AneeshDatabase Consultant
Top Expert 2009
Commented:
you can create a table with the same structure the sp returns , then you can insert the data like this

insert tableName
exec spName @params

Author

Commented:
How does the table stay up-to-date? Would I need to create a SQL Job?
Billing Engineer
Most Valuable Expert 2014
Top Expert 2009
Commented:
>How can I call the SPROC from a view or table
in short: you cannot.

you can only run a regular job to re-update the table from the table's output.
there may be issues about the data view during the procedure running (how much time does the proc take?)

maybe you could make a function instead of the proc?

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial