Example:
String: 'Sunil|Darshan|Rahul|Ritesh|Pravin|Preetam' -- you will replace with Variable or field or other string.
Separator: | -- you will use another symbol (eg. $, #, comma(,) etc.)
SELECT regexp_substr('Sunil|Darshan|Rahul|Ritesh|Pravin|Preetam','[^|]+', 1, LEVEL) Employee_Name
FROM dual
CONNECT BY regexp_substr('Sunil|Darshan|Rahul|Ritesh|Pravin|Preetam', '[^|]+', 1, LEVEL) IS NOT NULL;
Output:
No comments:
Post a Comment