• In general, look up the INSERT ... SELECT syntax. That's your buddy when dealing with stuff like this. Your current structure, as everyone else has already said, is broken.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning