title: SQL Server Concatenate string column value to 5 char long
body: <p>Scenario:</p>
  
  <p>I have a table1(col1 char(5)); A value in table1 may '001' or '01' or '1'.</p>
  
  <p>Requirement:</p>
  
  <p>Whatever value in col1, I need to retrive it in 5 char length concatenate with leading '0' to make it 5 char long.</p>
  
  <p>Technique I applied:</p>
  
  <pre><code>select right(('00000' + col1),5) from table1; 
  </code></pre>
  
  <p>I didn't see any reason, why it doesn't work? but it didn't.
  Can anyone help me, how I can achieve the desired result?</p>