Assuming that mytableID is the primary key for mytable and both tables have the same field names:INSERT INTO mytableSELECT t.*FROM #Temp tLEFT JOIN mytable m ON t.mytableID = m.mytableIDWHERE m.mytableID IS NULL
If mytableID is an identity, then you'll also need to specify a Column list in the insert clause:INSERT INTO mytable (mytableID, Colx, Coly, Colz)
There are 10 types of people in the world, those that understand binary, and those that don't.