Using Temporary Tables and Re-Using Temporary Tables in a SSRS Report

Bobby P 231 Reputation points
2024-11-07T13:49:08.8166667+00:00

So we need to standardize Member Eligibility by using a SQL Server Stored Procedure that will be called, Executed by our Patient/Member SSRS Reports.

The SQL Server Stored Procedure currently uses a Global Temporary Table to pass its result set back to the calling Report's SQL Server Stored Procedure.

Just trying to think the best way to go about doing this as multiple reports may be running or kicked off at the same time to utilize this standardized executed SQL Stored Procedure.

Maybe a Staging Table is a better idea but we will need someway to discern my result set, Business User #1, from say Business User's #2 result set. Even if it is in a Staging Table, I guess we'd have to incorporate cleaning up that Staging Table upon the final report result set presentation SELECT.

Why we were thinking more of a Global ##Temporary Table because that would purge itself after execution. But then we have the dilemma of how we'd name that Global ##Temporary Table to make it unique from one report execution to the next and across reports.

Just wondering if anyone has faced this dilemma before and logistics of dealing with Temporary Tables and uniquely defining and using a Temporary Table across SSRS Reports so if re-using a standardized SQL Server Stored Procedure my result set is unique and different from say Business User #2.

Any insight and help would be GREATLY appreciated.

Thanks!

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
14,070 questions
SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
2,944 questions
Transact-SQL
Transact-SQL
A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
4,663 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.