Table Name: config
Columns Names Involved: name, value
The value column of my config table stores text values separated by commas like this: text1,text2,text3,etc
I have a list of 28 possible text strings that can exist in that column. I need a query that will report which text strings from my list do NOT appear in the value column for rows where the name column contains ‘config_name’.
The following does not work:
SELECT value FROM config WHERE NOT EXISTS (SELECT value FROM config WHERE name = ‘config_name’ and (value like ‘%text1%’ or value like ‘%text2%’ or value like ‘%text3%’));
pgam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.