SQL Junte -se no curinga
select *
from tableA a join
tableB b
on a.id like '%' + b.id + '%';
Combative Cat
select *
from tableA a join
tableB b
on a.id like '%' + b.id + '%';