You can probably tell I have had a SQL database day today. Anyway, I have found that temporary tables can be very useful.