I have a table postgres table I want to find the unmatched string from the table
Query
`select * from table WHERE column1 LIKE ANY(ARRAY['%test1%','%test2%','%test3%'])`
Expected Result
Assume
test1 is a MATCH
test2 is a Mismatch
test3 is a Mismatch
I need test2 and test3 value alone to be displayed in result (Comma separated or any other way)
What I tried
SELECT
regexp_replace(column1, '(test1|test2|test3)', '', 'g') AS non_matching_parts
FROM
ip.table
WHERE
column1 LIKE ANY(ARRAY['%test1%','%test2%','%test3%']);
I believe we need to move the values to a temp table and compare with the actual table, but I don’t want temp table to be created