Solved

Create Table based off SPROC

Posted on 2014-03-05
3
127 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
ID: 39908044
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
ID: 39908052
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
ID: 39923491
>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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
I have a large data set and a SSIS package. How can I load this file in multi threading?
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
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.

832 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