I have a string column "COL" in MySQL, which can be split in sub-strings. Something as "q;we;rt". The result is found with
select COL from [TABLE]
I also have a select which returns this kind of sub-strings from another tables (the columns have values as "rt", etc.). The problem is I have a query like:
select [column] from [...]
Let consider the result has 2 rows, as "q" and "rt". I need to create a query which returns all the sub-strings from "COL" which are not found in the previous query, and also the position. In this case, the result is 1 row with 2 columns (column 1 - "we", and column 2 - "2" - position of "we" in "q;we;rt"). Note that the number of sub-strings from "COL" is not fix. And I want to do this without creating any function / stored procedure.