I cant get the understanding of this statement - not eveN after googling around
pv_no_list :=\'23,34,45,56\';
SELECT DISTINCT REGEXP_SUBSTR (pv_no_li
connect by
has nothing to do with regex_substr
:
The first is to perform a hierarchical query, see http://docs.oracle.com/cd/B19306_01/server.102/b14200/queries003.htm
The second is to get a substring using regular expressions.
This query "abuses" the connect by
functionality to generate rows in a query on dual
.
As long as the expression passed to connect by
is true, it will generate a new row and increase the value of the pseudo column LEVEL
.
Then LEVEL
is passed to regex_substr
to get the nth value when applying the regular expression.