is it possible to use variables in LIKE pattern matches in sqlite queries? i have the tables:
Table 1:
id names linker
1 williams, john; jones, lisa A1
2 jones, lisa A1
3 sanders, karim A2
...
Table 2:
index name linker
X williams A1
Y jones A1
Z sanders A2
i want to join Table 1 to Table 2 on the linker column, grouped by Table2.index, but only consider entries from Table 1 where Table1.name is a substring of Table2.names, ie Table2.names LIKE '%Table1.name%'. in above tables williams entry with id 1 in table1 would be associated with index X in table2, but entry with id 2 of table1 would not. how can a column be used inside a pattern match? this does not work
select * from table1 join table2 on (table1.linker == table2.linker) where names like '%' + name + '%' group by table1.index