title: Insert variable to temp table
body: <p>How can I insert declared var into temp table?</p>
  
  <pre><code>DECLARE   @ConcatString VARCHAR(4000)
  SELECT   @ConcatString = COALESCE(@ConcatString + ', ', '') + LanguageName FROM EmployeeLanguage  where  EmployeeId=10504
  SELECT   @ConcatString AS Language
  
  GO
  
  DECLARE @T1 TABLE (
  Item1 BigInt,
  Item2 VARCHAR(200)
  )
  INSERT INTO @T1 select 1,(SELECT   @ConcatString AS Language ) as t
  
  select * from @T1
  </code></pre>