I want to do some thing like this:
select * from table1 where name Like in (select name from table2 where id = '%123')
Suppose
select name from table2 where id = '%123'
Results are: abc123,def123,ghi123,...
And the table1 contains the name fields as AB-abc123-CD,CD-def123-HB,...
How can I do this?
If I understand you correctly:
OR
Did I understand you question correctly?