title: Changing datatype lead to change the result
body: <p>I have such a query:</p>
  
  <pre><code>select RIGHT(REPLICATE('0',10)+CAST(Productid as VARCHAR(10)),10) as haha  
  from [Production].[Product]
  </code></pre>
  
  <p>if I change <code>VARCHAR(10)</code> to <code>CHAR(10)</code> then results have the length of 3 instead of 10?</p>
  
  <p>why?</p>