Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Split/cut a string
jpabich wrote:
> I have a stored procedure where I want to get the last characters off a
> string. Say I have
>
> i VARCHAR2;
>
> i := 'ABC12345';
>
> I want to be able to get the 12345 off. How do I do this?
Your demo doesn't match you words.
Your words say "last characters" which would be "5".
What is it you really want?
If it is the numbers then I would suggest using TRANSLATE.
SELECT TRANSLATE('ABC12345', '1ABC', '1') FROM dual;
Will be very efficient.
-- Daniel Morgan University of Washington Puget Sound Oracle Users GroupReceived on Tue Sep 19 2006 - 15:45:20 CDT
![]() |
![]() |