I have colon separated tags associated to two different entities in two tables. Would like to do a sub-string matching for the tags and relate the entities.
Table 1 - Table of issues
Issue ---------------- Tag
Issue 1 -------------- Dual UOM:Serial Control:Material Issue
Issue 2 -------------- Validity rule:Effectivity date
Table 2 - Table of Tests
Test ----------------- Tag
Test 1 --------------- Inventory:Outbound:Material Issue
Test 2 --------------- Items:Single UOM
Test 3 --------------- Items:Dual UOM
Test 4 --------------- Recipe:Validity Rule
Test 5 --------------- Formula:Version control:date
Test 6 --------------- Formula:Effectivity date
Now, for each issue in table 1, I need to compare its associated tag with the tags in table 2 and find applicable tests.
In above ex,
Issue 1 - Matched tests will be Test 1, Test 3
Issue 2 - Matched tests will be Test 4, Test 5
All the tags associated to the issues and tests will come from a common tag master.
Any help in providing the sql code snippet that would do this sub-string to sub-string matching is much appreciated.