David Musgrave has a look at Working with Temporary Tables in Dexterity.
Working with Temporary Tables in Dexterity with Dynamics GP
SQL & DataDevelopment & Integration
Archived post from 2010. Dynamics GP and the links it points to have changed since; check current documentation before relying on version-specific steps.