title: cast in sql server 2005
body: <p>i want to add 0 to a number </p>
  
  <pre><code>DECLARE  @AccPD Char(6)
  DECLARE  @PostMT Char(2)
  
  SELECT @accpd ='201102'
  
  select @PostMT  = case when substring(@accpd,5,2) = '01'
    then substring(@accpd,5,2) + 11
    else CAST('00' AS Char(2))  + substring(@accpd,5,2)-1
   end 
  
  SELECT @PostMT 
  </code></pre>
  
  <p>this should return a value 01 instead of 1</p>