Need Explanation on this query [message #644932] |
Fri, 20 November 2015 04:23 |
|
hharishh86
Messages: 2 Registered: November 2015 Location: CHENNAI
|
Junior Member |
|
|
Hi,
I am new to Oracle Regex Function. I am trying to understand how Regex works .
Need your help on this .
Thanks in Advance.
Input : 'SMITH,ALLEN,WARD,JONES'
The query executed and output :
SQL> select regexp_substr('SMITH,ALLEN,WARD,JONES','[^,]+', 1, level) from dual
2 connect by regexp_substr('SMITH,ALLEN,WARD,JONES', '[^,]+', 1, level) is not null;
REGEXP_SUBSTR('SMITH,A
----------------------
SMITH
ALLEN
WARD
JONES
I need to know how this works and also the use of LEVEL and Connect by clause .
Also please help me with good regex tutorials if possible
Thanks,
Harish
|
|
|
|
|