Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

REGEXP_SUBSTR in where clause

ivwviJul 7 2009 — edited Jul 7 2009
select * from abc;

COL
----------------
-xxx 999 yyyy123
03112X
123:1
34455
3456xyc
xxx234
xxxxxx

7 rows selected.


select 
REGEXP_SUBSTR ( col
	      , '[0-9]+'
	      )
from abc;
 
REGEXP_SUBSTR(CO
----------------
999
03112
123
34455
3456
234

 select * from abc where col =
REGEXP_SUBSTR ( col
	      , '[0-9]+'
	      );   
COL
----------------
34455
why output of both above sql is not similar?

How it works?

Thanks In advance.
This post has been answered by Walter Fernández on Jul 7 2009
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 4 2009
Added on Jul 7 2009
7 comments
6,998 views