Using "LIKE" with a subquery?
459560Aug 30 2007 — edited Aug 31 2007I am running a query that returns a few text values (right now, there are three, but more could be added). What I need to do is then run a LIKE operator on a text field to see if that field contains any of these three values.
select values from table1;
select * from table2 where field1 like (%values%)
yes, I know that I cannot use like with multiple values (without an OR), and I know that I cannot use like with a subquery. What I am looking for is a way in SQL or PL/SQL to do this. I'm guessing I would have to use some sort of a loop and counter. It seems like it's going to be pretty ugly. Any suggestions would be greatly appreciated.