title: Looping & Renaming #Temp table columns
body: <p>I've got a #TempTble which looks like this:</p>
  
  <pre><code>Col1,Col2,5,8,19,....
  </code></pre>
  
  <p>Also, I have another table with description that matches the keys in #TempTble:</p>
  
  <pre><code>key   Descr    
  ===   ====    
  5     Descr1    
  8     Descr2    
  19    Descr3
  </code></pre>
  
  <p>Which is the best way to loop through the #TempTble and rename its columns with the matching descriptions so it looks like this:</p>
  
  <pre><code>Col1,Col2,Descr1,Descr2,Descr3,...
  </code></pre>
  
  <p>Thanks in advance.</p>