I have a table A with the string-column a and a table B with the string-column b. a is a substring of b.
declare @tmp1 table (id int, a varchar(max))
declare @tmp2 table (id int, b varchar(max))
insert into @tmp1 (id, a) values (1,'one')
insert into @tmp2 (id,b) values (1,'onetwo')
select * from @tmp1 one inner join @tmp2 two on charindex(one.a,two.b) > 0
You can also use charindex, 0 means its not found, greater than 0 is the start index
charindex