March 5, 2009 at 6:23 pm
I need to join two tables and search using the contain statement, how do you do this ?
It works with '%like%' but you cant use join and contain, what is a workaround ?
Thanks
March 6, 2009 at 5:24 am
You can join the two tables and use a CONTAINS predicate on each of them with the same search argument.
E.g.:
select<column list>
from<table 1> t1
<inner or outer?> join<table 2> t2
ont2.<common key> = t1.<common key>
where(contains(t1.<fts column>, <search argument> ))
<and, or?> (contains(t2.<fts column>, <search argument> ))
ML
---
Matija Lah, SQL Server MVP
http://milambda.blogspot.com
March 6, 2009 at 12:38 pm
Many Thanks !
March 7, 2009 at 12:17 am
No problem. 🙂
Post Back and let us know how you get on!
ML
---
Matija Lah, SQL Server MVP
http://milambda.blogspot.com
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply