Search code examples
sql-serverreporting-servicesdatabase-administration

How to put a stored procedure results to a table and truncate results every time the stored procedure is executed


I have a stored procedure that runs with a SSRS Report that generates a report daily for users. What I am trying to accomplish is to capture yesterday's records from the stored procedure and compare them with today's data to get variance. See the screenshot below.

I have modified the stored procedure to get yesterday's records but I need assistance how to put those records/results from the stored procedure into a table for variance comparison.

enter image description here


Solution

  • Thank you ! INSERT INTO & EXEC worked for me . supplying the right parameters to SP was the issue on loading the records to a table created .