Dave,
Other than using multiple containstable predicates (that can also affect the
query performance), there are few alternatives, such as:
-- AND'ing CONTAINSTABLE for multiple FT enable columns in the same table!!
use Northwind
go
SELECT e.LastName, e.FirstName, e.Title, e.Notes
from Employees AS e,
containstable(Employees, Notes, 'BA') as A,
containstable(Employees, Title, 'Sales') as B
where
A.[KEY] = e.EmployeeID and
B.[KEY] = e.EmployeeID
-------> the above query with RANK and Weight as well...
SELECT e.LastName, e.FirstName, e.Title, e.Notes, B.[KEY], B.[RANK] as
B_RANK, A.[RANK] as A_RANK
from Employees AS e,
containstable(Employees, Notes, 'ISABOUT (BA weight (.2) )') as A,
containstable(Employees, Title, 'Sales') as B
where
A.[KEY] = e.EmployeeID and
B.[KEY] = e.EmployeeID
Note, each containstable is a "round-trip" to the FT Catalog and depending
upon the number of rows in your FT-enable table, this can affect the query's
performance. You should use "*" where you can to search all columns, and
then use, when necessary, a query with multiple containstable clauses.
Regards,
John
[quoted text, click to view] "dave" <dy@onlinelg.com> wrote in message
news:056401c36da9$9899c220$a101280a@phx.gbl...
> I have figured how that when i type in "bob and Joe" (and
> i am using full text search ContainsTable with all
> columns specified "*") that it will search each column
> for the exact text of "bob and Joe".
>
> My problem or question is how do I use fulltext if i want
> to have sql return the results where bob would be in one
> column and joe in another column?
>
> Do i need to perform 2 Containstable queries while
> specifying the specific columns in each query?
>
> The problem is that i have a table with 20 columns and i
> want the user to just type in one textbox and have sql
> return any rows where bob shows in one column while joe
> shows in another.
>
> How best can i do this?
> thank you
> dave