Then I think the fastest way is to do a one-time update first.UPDATE TableA SET Column1 = LTRIM(RTRIM(Column1))
UPDATE TableB SET Column2 = LTRIM(RTRIM(Column2))
and then use a normal INNER JOIN.
If an update is not possible then I think aFROM TableA
INNER JOIN TableB ON LTRIM(TableB.Column2) = RTRIM(TableA.Column1)
If value in fields has exact the same number of characters a join as following might be fasterFROM TableA
INNER JOIN TableB ON RIGHT(TableB.Column2, 6) = LEFT(TableA.Column1, 6)
Peter Larsson
Helsingborg, Sweden