Quantcast
Channel: SQL Server Database Engine forum
Viewing all articles
Browse latest Browse all 12963

Is there a way to select a document that contains a word not followed by a particular word in full text?

$
0
0

I have a table named Documents that has Content field full text indexed

in

Now i need to create a query in such a way that the query should return docs that have at least one word "hello" that does not have word "world" following it.

--sth likeselect content from documentswherecontains(Content,N'hello(not followed by word "world")')

And the result should be

  1. "hello" -- since this does not have world following hello in it"

  2. "hello friend and hello world" -- this document has word hello that is not followed by world it it"

Can a full text query be formulated in a way to achieve above results? If so how?? I want to avoid parsing Content manually as much possible as I can.



Viewing all articles
Browse latest Browse all 12963

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>