table INSERT using While loop <p>While I've read many answers here, this is my first question on stackoverflow and I'm reasonably new to SQL. I am trying to use a WHILE loop (SQL Server 2008) to insert some records into a table. Here's the data I'm starting with:</p> <pre><code>SeasID FacilityID PL Zone Section Row FromSeat ToSeat 11 17 1 g2 cf a 1 5 32 18 14 w13 r2 c 10 12 </code></pre> <p>I need to insert a row for every unique seat into a new table. Here's what I'd like to insert:</p> <pre><code>SeasID FacilityID PL Zone Section Row Seat 11 17 1 g2 cf a 1 11 17 1 g2 cf a 2 11 17 1 g2 cf a 3 11 17 1 g2 cf a 4 11 17 1 g2 cf a 5 32 18 14 w13 r2 c 10 32 18 14 w13 r2 c 11 32 18 14 w13 r2 c 12 </code></pre> <p>I've tried many things and I don't think I understand loops very well yet. Any help you can provide would be great. Thanks</p> <p>Matt</p>