how can I convert text column value to array like :
i have the values ” text1, text2, text3″
thanks in advance.
Sign Up to our social questions and Answers to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers to ask questions, answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use REGEXP_SUBSTR to Extract desired info
REGEXP_SUBSTR( string, pattern [, start_position [, nth_appearance [, match_parameter [, sub_expression ] ] ] ] )
And CONNECT BY to loop over the string searching for the “,” and use it as a delimiter.
SELECT REGEXP_SUBSTR (‘text1, text2, text3’,
‘[^,]+’,
1,
LEVEL),LEVEL
FROM DUAL
CONNECT BY REGEXP_SUBSTR (‘text1, text2, text3’,
‘[^,]+’,
1,
LEVEL)
IS NOT NULL;