I'm working on an SQL statement in SQL Server Managment Studio and I've come across a problem. I want to take a table which is full of strings that are lists delineated by a ','. Then use the NOT IN
to compare them to a list of values. It would look something like this:
commaStr = '6F, 0F, 0W'
Where (string is converted here) NOT IN ('0F', '0R', '0W')
I'm unsure of how to go about this so I'm hoping for just some general direction. I've seen a lot of people create a function to handle this solution but I was curious if you could set something up compare the two in the where clause. My starting thought were definitely some sort of loop, but I'm not sure if it's possible to set one up in the where clause.