I need to use the IN clause in a situation where the in part is a string.
Example:
SELECT * FROM BLABLABLA WHERE 4 IN ('6,5,4')
This causes me this error:
Conversion failed when converting the varchar value '6,5,4' to data type int.
In my real case the string '6,5,4' comes from a field of the database itself that I can not modify, so I would have to figure out how to, in my query, convert it so that it stays (6,5,4) or ('6', '5', '4'), so SQL could be run.
I would like to know how to solve this problem without damaging the performance.