I have a database field that contains a list of values, and I want to be able to compare that against another list of values and return all rows that have any values matching.
i.e. database field A values:
Row 1 field A = (1,2,3)
Row 2 field A = (1,5)
Row 3 field A = (6,9)
User values = (2,3,6)
Select * From table Where field A list IN? user values list
Result would return rows 1 and 3
I know I can compare a single value in a database field against a list using the IN operator (ie. where 1 IN (1,2,3)). Does anyone know how to check list to list in SQL, or if it is even possible?
Thank you.
i.e. database field A values:
Row 1 field A = (1,2,3)
Row 2 field A = (1,5)
Row 3 field A = (6,9)
User values = (2,3,6)
Select * From table Where field A list IN? user values list
Result would return rows 1 and 3
I know I can compare a single value in a database field against a list using the IN operator (ie. where 1 IN (1,2,3)). Does anyone know how to check list to list in SQL, or if it is even possible?
Thank you.