0 - 2 of 2 tags for lpad

Is it not possible to use RPAD and LPAD more than 2 times in the same QUERY? It cannot be right.
This small example gives error when running it:

Hello,

Are there any doc's which discuss SQL UDF's?  (Especially the various qualifiers in the CREATE FUNCTION statement).  I am trying to determine why my regular SQL works as expected, but when you put the same code into an SQL UDF, it returns unexpected results.  Any insight would be greatly appreciated.