tags:

views:

900

answers:

1

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?

Now, I use this way for pad zero when COLUMN1 type is VARCHAR

 RIGHT('0000' ||  COLUMN1 ,4) AS  RPAD
 LEFT('0000' ||  COLUMN1 ,4) AS  LPAD

Have better way for replace LPAD or RPAD function?

+1  A: 

I think you probably want the REPEAT scalar function.

Michael Sharek