I have a table with mixed text information.
I have another table with names.
I would like to find those records in the table of mixed text which contain the names of the names table.
The tables are:
tb_Name
¦ID ¦ name ¦
¦----¦--------------¦
¦ 0 ¦ JOHN/K ¦
¦ 1 ¦ PETER/F ¦
…
tb_Account
¦ ID ¦ mixed_text ¦ amount ¦
¦-----¦------------------------------------¦------------¦
¦ 0 ¦ WE0812 JOHN/K RLK ¦ 190 ¦
¦ 1 ¦ WE0112 4D JOHN/K G12 ¦ 20 ¦
¦ 2 ¦ SHOP 1287 ¦ 300 ¦
¦ 3 ¦ KPM PETER/F ¦ 10 ¦
…
The desired outcome would be:
tb_Account
¦ ID ¦ mixed_text ¦ amount ¦
¦-----¦------------------------------------¦------------¦
¦ 0 ¦ WE0812 JOHN/K RLK ¦ 190 ¦
¦ 1 ¦ WE0112 4D JOHN/K G12 ¦ 20 ¦
¦ 3 ¦ KPM PETER/F ¦ 10 ¦
I tried to create some queries with no success:
SELECT “tb_Account”.*, “tb_Name”.“name” FROM “tb_Account”, “tb_Name” WHERE “tb_Account”.“mix_text” LIKE ‘%“tb_Name.name”%’
Any help would be greatly appreciated.