• Hmm... maybe your Name column (in table A) has the char datatype (I expected it to be varchar). In this case, try:

    SELECT b.*, a.code FROM a 
    INNER JOIN b ON b.text LIKE '%'+RTRIM(a.name)+'%'

    Razvan