Dan Thomas
SSC Enthusiast
Points: 184
More actions
September 18, 2004 at 8:53 am
#60221
can I create a join using a LIKE statment?
E.g. I want to to join tables on
t1.keyword LIKE %t2.profile%
so if the word in t1.keyword is within the text in t2.profile then there will be a join?
Douglas De Ivey
Old Hand
Points: 396
September 18, 2004 at 9:16 am
#523577
Yes you can do this but It isn't very efficient so you should take care where you use it.
Example:
Select a.col1, b.col1, etc...
from TableA a
join TableB b
on a.col1 like '%' + b.col1 + '%'
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply