Unless there is something i am missing there is no real advantage to having a temp table unless you are worried about storage.  From the code above I would have to manually create an identical table then run my filters to populate it.  That is not as simple as the Microsoft code that i originally posted.   Also in MSFT Studio i can script out the schema so that i would not have to type in the entire schema.  Is there a way to do that in Cache SQL.   From the GUI i can see the table structure but i don't see a way to create a script to regenerate the table?