I have an SSRS report that has dynamic table names depending on what is entered in the parameter. Because of this, I have to put any thing that calls for these dynamic tables into a string.
I started using a global temp table to insert the info from the query that's within the string into a global temp table so that the rest of the query can access it outside of the string.
I then Drop the table after it gathers the info and puts it into a regular temp table. Are there any security concerns with this? I know that the global temp table is accessible by anyone, but it only stays out there for 30 seconds max whenever someone runs the report.
Before, all the data had to be contained in a string for the temp table to be accessed by the rest of the query. I looked for ways to set permissions on global temp tables, but there does not seem to be a way to do so.