Adicione a coluna de identificação à inserção da tabela de temperatura

SELECT *, IDENTITY( int ) AS idcol
  INTO #newtable
  FROM oldtable
Shy Seal