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 / December 2007

Tip: Looking for answers? Try searching our database.

querying  columns -  2005 full text catalog

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
SOC - 30 Nov 2007 18:36 GMT
Hello,I have been trying some methods of querying different columns using a
2005 full text
catalog.http://technet.microsoft.com/en-gb/library/ms345119.aspx#yukonftsea_topic5e.g.1
SELECT pk, txtCol2, txtCol3
FROM myFt_Table
WHERE CONTAINS( ( txtCol2, txtCol3 ) , ' "foo" AND "bar"
')e.g.2CONTAINSTABLE(myFt_Table,(txtCol2,txtCol3),' "foo" AND "bar" 'Can
anyone advise if it's possible to achieve something like the
following:SELECT pk, txtCol2, txtCol3FROM myFt_TableWHERE CONTAINS(txtCol2,
' "foo"')AND CONTAINS(txtCol3, ' "bar" ')but with CONTAINSTABLE, in order to
have a join.Thanks SOC.
SOC - 03 Dec 2007 11:44 GMT
(resent, improved format)
Hello,I have been trying some methods of querying different columns using a
2005 full text catalog.

http://technet.microsoft.com/en-gb/library/ms345119.aspx#yukonftsea_topic5

e.g.1
SELECT pk, txtCol2, txtCol3
FROM myFt_Table
WHERE CONTAINS( ( txtCol2, txtCol3 ) , ' "foo"AND"bar"')

e.g.2

CONTAINSTABLE(myFt_Table,(txtCol2,txtCol3),' "foo" AND "bar" '

Can anyone advise if it's possible to achieve something like the
following i.e. finding differnent keywords in different columns:

SELECT pk, txtCol2, txtCol3

FROM myFt_Table

WHERE CONTAINS(txtCol2, ' "foo"')

AND CONTAINS(txtCol3, ' "bar" ')

but with CONTAINSTABLE, in order to
have a join.

Thanks SOC.
Daniel Crichton - 03 Dec 2007 16:29 GMT
SOC wrote  on Mon, 3 Dec 2007 11:44:40 -0000:

> Can anyone advise if it's possible to achieve something like the
> following i.e. finding differnent keywords in different columns:

> SELECT pk, txtCol2, txtCol3
> FROM myFt_Table
> WHERE CONTAINS(txtCol2, ' "foo"')
> AND CONTAINS(txtCol3, ' "bar" ')

> but with CONTAINSTABLE, in order to have a join.

How about

SELECT t.pk, t.txtCol2, t.txtCol3
FROM myFt_Table t
INNER JOIN CONTAINSTABLE(myFt_Table,txtCol2,'"foo"') AS c1 ON t.pk =
c1.[KEY]
INNER JOIN CONTAINSTABLE(myFt_Table,txtCol3,'"bar"') AS c2 ON t.pk =
c2.[KEY]

Signature

Dan

 
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.