Column A |
---|
cat, dog, horse |
monkey, donkey |
cat, tree |
I need a way to return me the rows which matches the string ‘cat|ball|tree’. Here my expected output is TRUE for first and third row and false for second row as there is cat matching for the first row and cat and tree matching for the third row. And no match for second row.
SELECT CASE WHEN REGEXP_LIKE ('cat, dog, horse', 'cat|ball|tree') THEN TRUE ELSE FALSE END AS match_found;
I tried using REGEXP_LIKE but it returns FALSE.
Also tried REGEXP only
SELECT 'cat, dog, horse' REGEXP 'cat|ball|tree'
Biplov Karna is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1