SELECT table1.B as B1,table2.B as B2 <br>FROM table1,table2<br>WHERE (table2.B LIKE '%' + Substring(table1.B, 1, 3) + '%') Or<br>(table2.B LIKE '%' + Substring(table1.B, 2, 3) + '%') Or<br>(table2.B LIKE '%' + Substring(table1.B, 3, 3) + '%') Or<br>(table2.B LIKE '%' + Substring(table1.B, 4, 3) + '%') Or<br>(table2.B LIKE '%' + Substring(table1.B, 5, 3) + '%')