[thelist] sql server: containstable() with multiple tables?
rudy
r937 at interlog.com
Fri Jan 11 10:20:04 CST 2002
>What I want to do is enable searching on t1.title as well as
>tipContent.content (currently in the containstable() function). Should I
be
>looking into another join with another containstable() call? Any help is
>graciously appreciated. =)
hi chris
never heard of containstable() before, but i can see what it's doing...
if t1.title is an ordinary varchar, try LIKE --
SELECT t1.id, t1.publishDate, t1.productCode
, t1.productName, t1.title, t1.author
, K.rank as Rank
FROM tips as t1
INNER JOIN containstable(tipContent, content
, '(""" & searchTerm & """)') as K
ON t1.id = K.[key]
WHERE t1.title LIKE '%[title search term]%'
looking at what i just wrote, it appears this will work like an AND
condition
if that's what you want, it might be efficient, too, since the optimizer
might restrict the t1 rows before attmpting the join
rudy
More information about the thelist
mailing list