Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: function to get only numbers
Haven't tried this out, but instead of a for loop, wouldn't this be better?:
nodigits := TRANSLATE(charnum,'1234567890') ; parsechar := TRANSLATE(charnum, nodigits);
Philippe Makowski wrote:
> for i in 1..longueur loop
> current_digit := SUBSTR(charnum, i, 1);
> if current_digit between '0' and '9' then
> parsechar := parsechar || current_digit;
> end if;
> end loop;
Received on Fri Jul 06 2001 - 11:25:33 CDT
![]() |
![]() |