Solved

Create Table based off SPROC

Posted on 2014-03-05
3
124 Views
Last Modified: 2014-03-18
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.
0
Comment
Question by:LCNW
3 Comments
 
LVL 75

Assisted Solution

by:Aneesh Retnakaran
Aneesh Retnakaran earned 250 total points
Comment Utility
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
0
 
LVL 1

Author Comment

by:LCNW
Comment Utility
How does the table stay up-to-date? Would I need to create a SQL Job?
0
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 250 total points
Comment Utility
>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?
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

I wrote this interesting script that really help me find jobs or procedures when working in a huge environment. I could I have written it as a Procedure but then I would have to have it on each machine or have a link to a server-related search that …
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now