title: How can print table variable values in tsql?
body: <p>I'm a new in <code>sql server</code> and write this <code>tsql</code>:<br/></p>
  
  <pre><code>DECLARE @TempCustomer TABLE
  (
     DATE_ nchar(20)
  );
  
  INSERT INTO 
      @TempCustomer 
  SELECT distinct [ExecuteDate]
  FROM 
       [ClubEatc].[dbo].[GetOnlineBills]
  
  DECLARE  @intFlag int
  set @intFlag=0;
  WHILE (@intFlag &lt;=2)
  BEGIN
      PRINT @TempCustomer.DATE_
      SET @intFlag = @intFlag + 1
  END
  GO
  </code></pre>
  
  <p><br/>
  but when i run that query i get this error:<br/></p>
  
  <pre><code>Msg 137, Level 16, State 1, Line 30
  Must declare the scalar variable "@TempCustomer".
  </code></pre>
  
  <p><br/>
  How can i solve that problem?thanks all.</p>