title: IBM DB2 LPAD/RPAD
body: <p>I use db2 v.9.1 on windows 2003 server so it can not use LPAD or RPAD functions scalar.
  because that functions support only z/OS right?</p>
  
  <p>Now, I use this way for pad zero when COLUMN1 type is VARCHAR</p>
  
  <pre><code> RIGHT('0000' ||  COLUMN1 ,4) AS  RPAD
   LEFT('0000' ||  COLUMN1 ,4) AS  LPAD
  </code></pre>
  
  <p>Have better way for replace LPAD or RPAD function?</p>