I have a 2 tables A and B in SQLite
A:
Name|Badge
----------
ABC |X
XYZ |Y
B:
ListCode |Badges
--------------------
V |'X','Y','Z'
I want to do something like this:
SELECT * FROM A WHERE BADGE IN (SELECT BADGES FROM B WHERE LISTCODE = 'V');
The problem is SELECT IN doesnt seem to work like that with literal csv from another table. How can I do this ?