I have tried to use a temporary table as an intermediate result holder for a SELECT statement. The problem is though that I can\'t access the temp table multiple times in ot
One way around this is to simply create a "real" table, rather than a temporary table.
The advantages that temporary tables offer:
If #1 is crucial for you, then you probably need to stick with temporary tables. Otherwise, if only one instance of this program runs at a time, or if you create the table name dynamically to make it unique, I recommend that you choose an appropriately unique name for this table and create it as a "real" table, then drop it when you're done.