Enhancement to RPAD or LPAD function Skip navigation

Enhancement to RPAD or LPAD function

score 55
You have not voted. Active

Dear Infa Technical team,

I have observed one limitation to LPAD/RPAD (Might be developed in that way only not sure). Presently LPAD/RPAD doesnot accept second orgument as dynamic value,when we use a dynamic value it throws error stating "Operand must be Constant".

 

Let me explain with one example:

Consider a below scenario:

Source:

ID     Value

2        A

3        B

4        C

 

In Target i want as below:

Target:

ID       value

2          AA

3          BBB

4          CCCC

 

I have tried using RPAD(in_Value,in_ID,in_Value)

 

It is throwing me error stating "Operand must be constant". If you can allow second/third operands also dynamic these kind of requirements can be solved easily.

Hope i am making sense.

 

Regards

Shirish

Comments

Vote history