Some of our users run our programs in the following setup, one program on a server but multiple (though few) users using it.
Now this leads to problems where the program uses temp tables. I've sorted the problem for most cases ie when they are used in code or as a simple report query, but I've just come across a report based on multiple queries that use a temporary table. (the soltuion i've got is basically appending the username to the tmp table name)
I can't combine the queries into one, and no solution seems to present it self.
Can I write a query where the table names are varibles?
Is there another solution?
Now this leads to problems where the program uses temp tables. I've sorted the problem for most cases ie when they are used in code or as a simple report query, but I've just come across a report based on multiple queries that use a temporary table. (the soltuion i've got is basically appending the username to the tmp table name)
I can't combine the queries into one, and no solution seems to present it self.
Can I write a query where the table names are varibles?
Is there another solution?