 <p>Try</p> <pre><code>INSERT INTO [dbo].[WordRelationship] SElECT a.WordId, b.WordId from [dbo].[Temp] t JOIN [dbo].{Word] a on t.HeaderWord = a.Word LEFT JOIN [dbo].{Word] b on t.OtherWord = b.Word </code></pre> <p><strong>EDIT</strong></p> <p>removed LEFT in Join over Headerword since it is a not null field in WordRelationship.</p>