I needed to be able to recreate the temporary table in a script, so I used this code to generate part of the columns of the CREATE TABLE statement:
SELECT char(9) + '[' + c.column_name + '] ' + c.data_type + CASE WHEN c.data_type IN ('decimal') THEN isnull('(' + convert(varchar, c.numeric_precision) + ', ' + convert(varchar, c.numeric_scale) + ')', '') ELSE '' END + CASE WHEN c.IS_NULLABLE = 'YES' THEN ' NULL' ELSE '' END + ',' From tempdb.INFORMATION_SCHEMA.COLUMNS c WHERE TABLE_NAME LIKE '#myTempTable%'
I have not tested all sql data types, but this worked for int, float, datetime, money and bit.
In addition, ApexSQL Complete (free) has a nice feature that allows you to export grid results to the Insert Into statement. I used this to load this created temporary table in my script. 
dajo Feb 21 '18 at 20:48 2018-02-21 20:48
source share