My requirement is as below
In the table there is a field say ID containing value as A_B_C. The input will be having value 'C'. I need to get 'B' from ID field and then query again as ID like '%B%'.
I am trying to use below approach but it is not working. Can you please help me with right approach?
I have written a subquery using substring to get 'B' from ID as below
Subquery: select SUBSTR(ID,17,15) from where ID like '%C%' - this returns B
Now I want to write another select statement as " select * from where ID like '%<result of subquery should be used here%' "