Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: REGEXP_REPLACE doesn't give the desired output
Jure <jure.br_at_gmail.com> wrote:
> SELECT SYSTIMESTAMP original, REGEXP_REPLACE(SYSTIMESTAMP, '\D', '')
> converted
> FROM dual
>
> and the result is:
> ORIGINAL|CONVERTED
> 20.6.2006 10:23:38,927000 +02:00|2006061023389270000200
>
> So from '20.6.2006 10:23:38,927000 +02:00', I got the string
> '2006061023389270000200'.
>
> This works on database A, but doesn't work on database B (the input to
> REGEXP_REPLACE is equal to its output).
[...]
I tried on a 10.2.0.2.0 database and it worked. When I tried on a 10.1.0.4.2 database it didn't replace the non-digits.
Either it is a bug in the older version (I couldn't find anything on Metalink) or it is an enhancement in the new version.
If you have a support contract, ask Oracle.
Yours,
Laurenz Albe
Received on Tue Jun 20 2006 - 09:07:59 CDT