RhythmAddict112
Programmer
Hi all,
Quick question. I'm doing some playing around w/FTS and it's functionality. I've been messing, specifically, with FREETEXTTABLE & CONTAINSTABLE and I have a question regarding them. Is it possible for me to use AND in the search to combine criteria? I've seen tons of examples using OR...but none w/AND. How would I go about this?
The following table is indexed for FTS...
CREATE TABLE [fts_test] (
[FirstName] [varchar] (60) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[LastName] [varchar] (60) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[MiddleName] [varchar] (60) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[HomeAddressCity] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[JobTitle] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[fts_id] [int] IDENTITY (1, 1) NOT NULL ,
CONSTRAINT [PK_fts_test] PRIMARY KEY CLUSTERED
(
[fts_id]
) ON [PRIMARY]
) ON [PRIMARY]
GO
All columns (except ID) are indexed via FTS. How would I find someone who has last name "Smith" AND job title of "programmer" ? I've tried numerous permutations of double quotes and parenthesis - none with the desired results (ONLY rows with "Smith" and "Programmer")
Any thoughts? Am I out of my mind? Thanks!
Quick question. I'm doing some playing around w/FTS and it's functionality. I've been messing, specifically, with FREETEXTTABLE & CONTAINSTABLE and I have a question regarding them. Is it possible for me to use AND in the search to combine criteria? I've seen tons of examples using OR...but none w/AND. How would I go about this?
The following table is indexed for FTS...
CREATE TABLE [fts_test] (
[FirstName] [varchar] (60) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[LastName] [varchar] (60) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[MiddleName] [varchar] (60) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[HomeAddressCity] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[JobTitle] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[fts_id] [int] IDENTITY (1, 1) NOT NULL ,
CONSTRAINT [PK_fts_test] PRIMARY KEY CLUSTERED
(
[fts_id]
) ON [PRIMARY]
) ON [PRIMARY]
GO
All columns (except ID) are indexed via FTS. How would I find someone who has last name "Smith" AND job title of "programmer" ? I've tried numerous permutations of double quotes and parenthesis - none with the desired results (ONLY rows with "Smith" and "Programmer")
Any thoughts? Am I out of my mind? Thanks!