I am using sql Oracle and I have in my DB a table with some values for action . For example:
id action
1 REH001
2 REH002
3 REH003
4 LOA001
5 LOA002
6 RFL
I want to get the id if the action matches a substring of multiple values (with delimiter ;)
for example I want to compare it to the string LOA;RFL
So I want to get the id if the 3 first chars are equal to LOA or RFL.
For this example it has to returns the ids 4,5 and 6
But it is not always the 3 first chars. For example I want to get the ids for the match with the substring REH003;TRE
For my example this will return me the id 3
I tried to simplify my question, because it is very difficult to explain, but I think you will understand with my examples.