all groups > sql server full text search > may 2005 >
You're in the

sql server full text search

group:

ContainsTable not returning rows


ContainsTable not returning rows Martin Hungerford
5/29/2005 9:37:23 PM
sql server full text search:
Hello folks,
I have a table with several FT-enabled varchar columns, in SQL Server
2000.

If I ask for SELECT * FROM tbl WHERE CONTAINS(*, SearchStringA) I get
several rows. (as expected)

If I ask SELECT * FROM tbl WHERE CONTAINS(*, SearchStringB) I also get
several rows and they are an overlapping set of rows. (also as expected)

However, if I ask for SELECT * FROM tbl WHERE CONTAINS(*, SearchStringA AND
SearchStringB) I get no rows. The two seperate searches find matches in
different columns. Is this the problem, and if so, what is the best way to
get a correct result?

Thanks in advance,
Re: ContainsTable not returning rows Hilary Cotter
5/30/2005 10:56:31 PM
If you want to look across columns you would have to do a FreeText query,
however with contains you would have to do this

select * from tablename where contains(col1, 'SearchPhraseA') or
contains(col2,'SearchPhraseB')

--
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html

Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Martin Hungerford" <Martin Hungerford@discussions.microsoft.com> wrote in
message news:4E584970-A671-460B-A6AE-B65ECC68DBF9@microsoft.com...
[quoted text, click to view]

AddThis Social Bookmark Button