Saturday, February 25, 2012

CONTAINSTABLE join to another table

hi
using CONTAINSTABLE i can easy do the following
select b.articleID, b.Caption, b.title, b.createdate,c.Title
SectionTitle
from CONTAINSTABLE(tblArticle, article, 'Nurse') a, tblArticle b,
tblSection c
where(a.[key] = b.articleID And b.sectionID = c.SectionID)
order by [rank] desc
but if i wanted to replace the constant 'nurse' in CONTAINSTABLE with
say a range of data from another table how can this be done.
in other words
Select * from CONTAINSTABLE(tblArticle, article, Select type from
tblNurse)
any help would help!!
ta
J
JK,
It's not so much that you want to join another table with CONTAINSTABLE, as
much as you want to pass the results of another query to the search string
within the CONTAINSTABLE and SQL Server 2000 does not directly support this.
The only way to do this is via a cursor or while loop processing.
Thanks,
John
"JK" <juliankhan@.hotmail.com> wrote in message
news:aa33756.0411120822.8500b89@.posting.google.com ...
> hi
> using CONTAINSTABLE i can easy do the following
> select b.articleID, b.Caption, b.title, b.createdate,c.Title
> SectionTitle
> from CONTAINSTABLE(tblArticle, article, 'Nurse') a, tblArticle b,
> tblSection c
> where(a.[key] = b.articleID And b.sectionID = c.SectionID)
> order by [rank] desc
> but if i wanted to replace the constant 'nurse' in CONTAINSTABLE with
> say a range of data from another table how can this be done.
> in other words
> Select * from CONTAINSTABLE(tblArticle, article, Select type from
> tblNurse)
> any help would help!!
> ta
> J

No comments:

Post a Comment