title: SQL Server concatenation varchar and int
body: <p>I have two variables:</p>
  
  <p>One is varchar and one is int, I am not sure how to write a while loop using casting so that it will show the following: for example if the while loop is 5 then the result should be 
  Meter 1
  Meter 2
  Meter 3
  Meter 4
  Meter 5.</p>
  
  <p>I have this code, but it is not running (cannot convert varchar to int) even when i do the casting it does not work.</p>
  
  <pre><code>DECLARE @Name varchar (20) = 'Meter',
          @MeterNumber int = 1
  
  WHILE (@MeterNumber &lt; 5)
  BEGIN
  PRINT @Name + ' ' + @MeterNumber
  SET  @MeterNumber = @MeterNumber + 1
  END
  </code></pre>