Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / Other Technologies / Full-Text Search / May 2005

Tip: Looking for answers? Try searching our database.

ContainsTable not returning rows

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Martin Hungerford - 30 May 2005 05:37 GMT
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,
Martin
Hilary Cotter - 31 May 2005 03:56 GMT
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')

Signature

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

> Hello folks,
>     I have a table with several FT-enabled varchar columns, in SQL Server
[quoted text clipped - 13 lines]
> Thanks in advance,
> Martin
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.