• Thanks for the reply. I know what the error means. I'm trying to figure out why when performing the loop it keeps putting in the same records multiple times. That's why I added the primary key to the temp table.