How to use like clause with multiple values in DB2 version 12.01.
SELECT t1.* FROM table1 t1 , ( select (pattern_col) as term from help_table ) t2 WHERE t1.col1 like t2.term
Pattern_col contains n number of values like(%abc%, %xyz%, %nnn%, ...)
Thanks in advance for your time and help.
I tried this solution mentioned in How to use LIKE with IN in DB2?. It works when I use sysdummy table (Oracle equivalent is DUAL)
But when i try to replace the sysdummy1 with actual table values, i get below error. SQLCODE = -132, ERROR: AN OPERAND OF LIKE IS NOT VALID
I am not able to figure out why it works with sysdummy1 and why not with actual table.