title: Select query with length issue
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/121864/most-efficient-t-sql-way-to-pad-a-varchar-on-the-left-to-a-certain-length">Most efficient T-SQL way to pad a varchar on the left to a certain length?</a>  </p>
  </blockquote>
  
  
  
  <p>I have the customer table where the customerID is of length:10
  but there are few customer where the length is 3 or 5</p>
  
  <pre><code>ex: 
  3445
  34
  789
  7800
  </code></pre>
  
  <p>but the output should be like the following, I need to prefix zero here if length is less than 10</p>
  
  <pre><code>0000003445
  0000000034
  0000000789
  0000007800
  </code></pre>
  
  <p>Script to get this data is:</p>
  
  <pre><code>select customerID from customer
  </code></pre>