Exact Match Query RRS feed

  • Question




    I have a text pharse and i want to do an extact match search (for example: "What is my name blaka")

    I wrote this query: ... WHERE (CONTAINS ('bla'')) but i keeps finding me the word blaka where i dont want it to return results in that example.

    becuase the word is blaka and i search for bla. what can i do to do an exact match?



    Wednesday, July 9, 2008 6:25 AM


All replies

  • Then you don't need Fulltext Engine. Why don't you write your query as follows:


    SELECT * FROM some_table WHERE name_field = 'bla'


    Then, only 'bla' is going to be brought.


    Wednesday, July 9, 2008 7:51 AM
  • Becuase as i said 'bla' is not the only word in the field.

    i have hello my name is bla, if i'm correct if i will search using your example the result will not find that phrase.


    What so you say?


    Wednesday, July 9, 2008 8:21 AM
  • ahh OK! I see your point now.


    Try this way:


    WHERE CONTAINS(field_name, ' "bla" ');

    Wednesday, July 9, 2008 8:31 AM