title: TSQL "multi-part identifier x could not be found" when updating fields in a temp table
body: <p>I created a temp table like this:</p>
  
  <pre><code>SELECT 
      email_key, 
      Best_pn_ee_active_pbm, 
      Best_pn_ee_active_pbm_pub, 
      Best_pn_ee_active_pbm_status, 
      Best_pn_ee_inactive_pbm, 
      Best_pn_ee_inactive_pbm_pub, 
      Best_pn_ee_inactive_pbm_status
  INTO #kjs_univ_sample
  FROM view_univ_email
  </code></pre>
  
  <p>I subsequently added some columns to be populated later:</p>
  
  <pre><code>ALTER TABLE #kjs_univ_sample
  ADD Best_pn_ee_active_pbm_my varchar(10), 
      Best_pn_ee_active_pbm_status_my varchar(10), 
      Best_pn_ee_active_pbm_pub_my varchar(10), 
      Best_pn_ee_inactive_pbm_my varchar(10), 
      Best_pn_ee_inactive_pbm_status_my varchar(10), 
      Best_pn_ee_inactive_pbm_pub_my varchar(10)
  </code></pre>
  
  <p>I then tried to update the fields I just added:</p>
  
  <pre><code>UPDATE #kjs_univ_sample
  SET 
      a.Best_pn_ee_active_pbm_my =        b.s_pbm_account_key, 
      a.best_pn_ee_active_pbm_pub_my =    b.s_pub_code,
      a.best_pn_ee_active_pbm_status_my = b.s_subscription_status
  FROM #kjs_univ_sample as a
  RIGHT JOIN #kjsemailcount as b ON a.email_key = b.email
  WHERE a.email_key = b.email
    AND b.counted = '1'
  </code></pre>
  
  <p>The issue is that all of 4 columns that were added via the <code>ALTER</code> are showing the error</p>
  
  <blockquote>
    <p>'The multi-part identifier "" could not be bound.  </p>
  </blockquote>
  
  <p>I've tried using the alias 'a' in the <code>Update</code> line and not using alias at all.  When I type the name of the fields I want to update it shows the drop-down but none of the fields added by the <code>ALTER</code> are there.  </p>
  
  <p>It's like it doesn't see them. A <code>Select *</code> will show them however. Any ideas? </p>