Use of RPAD.
sql>Select rpad('A',5) from dual;
----------------
'A '
But if NULL is one of the Argument then RPAD will not work.
Solution:sql> set NULL *
sql> Select rpad(NULL,5) from dual;
----------------
*
sql> set NULL *
sql> Select rpad(NVL(NULL,' '),4) from dual;
----------------
' '
We will have to use NVL with rpad.
Thanks,
Soham Khot