There is no issue with the rpad function, is only the result that I have get have return additional space even the field size is not that long. I've try execute the command provided but it have return the results as shown :-
SQL> SELECT RPAD('John Smith', 25, 'x') FROM dual;
RPAD('JOHNSMITH',25,'X')
----------------------------------------------------------------------------------------------------
John Smithxxxxxxxxxxxxxxx
SQL> SELECT RPAD('John Smith', 25) ||'<-' x FROM dual;
RPAD('JOHNSMITH',25)||'<-'
----------------------------------------------------------------------------------------------------
John Smith <-
I know the correct return result should be
RPAD('JOHNSMITH',25)||'<-'
---------------------------
John Smith <-
Is it due to any system setting which cause the above issue, as it have impact to all my scripts. Thanks.