Query including Match All Words, Match Any Words, and Exact Phrase Criteria

Posted on 2006-05-12
Last Modified: 2008-03-10
I am writing a query that can either have Match All Words, Match Any Words, and Exact Phrase criteria. I am little confused about Match All Words and Match Any Words. For Exact Phrase I know I have to use the '=' operator. But how will I differential between Match All Words, Match Any Words? Ans shouldnt Match All Words and Exact Phrase act the same?

Thanks, Nauman.
Question by:nauman_ahmed
    LVL 10

    Expert Comment

    You can use
    LIKE '%word%'
    LVL 25

    Author Comment

    Vadim63, I know about the like clause but how will you differential Match All Words and Match Any Words?

    LVL 10

    Accepted Solution

    WHERE     (Something LIKE '%word1%') OR
                          (Something LIKE '%word2%')       -   for any word

    WHERE     (Something LIKE '%word1%') AND
                          (Something LIKE '%word2%')       -   for all words
    LVL 25

    Author Comment

    THanks for the reply :)


    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    In this article—a derivative of my blog post (—I will explore a few different perspectives on which week today's date falls within using Microsoft SQL Server. First, to frame this stu…
    Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
    Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
    Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now