1

I need something like:

SELECT * FROM Table1 WHERE Name LIKE %Table2.Name%
Arun Singh
  • 1,538
  • 4
  • 19
  • 43
simone
  • 801
  • 2
  • 13
  • 25
  • Can you post your specific table names, and the relevant fields from the tables (names and data types). Also include the fields you need for the join. – Mark Byers Jan 21 '10 at 10:05

2 Answers2

1
select <col list>
from table1 t1 inner join table2 t2
on t1.name like concat('%', t2.name, '%')
davek
  • 22,499
  • 9
  • 75
  • 95
  • you tagged your question as mysql, and I tried it on mysql successfully before posting. What error do you get? – davek Jan 21 '10 at 10:25
0

You can use join between 2 tables if there is a common field.

Jacob Schoen
  • 14,034
  • 15
  • 82
  • 102
Haim Evgi
  • 123,187
  • 45
  • 217
  • 223