need right side of string help - oracle

rh71

No Lifer
Aug 28, 2001
52,844
1,049
126
stringA can be '15928778'.

Trying to SQL 'select' it to just the last 5 characters, and then add a letter A in front of it all resulting in 'A28778'.

I was playing with LPAD, RPAD, TRIMs, and none of these worked the way I wanted. Not sure how to use REPLACE to do this if that'll even work. Perhaps I have to throw 2 functions together?

EDIT>>> minutes after whining about this I figured it out with a replace and lpad within it.
 

KentState

Diamond Member
Oct 19, 2001
8,397
393
126
The best functions are LENGTH and REVERSE in conjunction with a substring.