DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Contains & Full-Text Search

  1. #1
    Laurent Allardin Guest

    Contains & Full-Text Search


    Hello,

    I would like to know if there is a way to search in a Full Text Search Index
    to search for all words containing "Week". So it should return me all records
    containing "Week" (example :"InformationWeek","Weekly")

    It works with Prefix_Term :
    So if I do
    Select * from Table where contains(Table.*,'"Week*"')
    it works and but it return me only the records beginning with "Week"

    And the contains does not seem to support the
    contains(Table.*,'"*Week*"').

    Is there anyway to find with wildcard (without using the Like) in Sql Server
    7.0?

    If not, does anyone as test the Full-text search in Sql Server 2000? Does
    Microsoft as implemented this feature, that should has been included in a
    Full-Text Search Engine...

    Thanks for your reply!

    Laurent Allardin,MCP
    Web Analyst/Developer
    BuroPLUS




  2. #2
    paul Guest

    Re: Contains & Full-Text Search


    "Laurent Allardin" <laurent.allardin@buroplus.ca> wrote:
    >
    >Hello,
    >
    >I would like to know if there is a way to search in a Full Text Search Index
    >to search for all words containing "Week". So it should return me all records
    >containing "Week" (example :"InformationWeek","Weekly")
    >
    >It works with Prefix_Term :
    >So if I do
    >Select * from Table where contains(Table.*,'"Week*"')
    >it works and but it return me only the records beginning with "Week"
    >>And the contains does not seem to support the

    >contains(Table.*,'"*Week*"').
    >
    >Is there anyway to find with wildcard (without using the Like) in Sql Server
    >7.0?
    >
    >If not, does anyone as test the Full-text search in Sql Server 2000? Does
    >Microsoft as implemented this feature, that should has been included in

    a
    >Full-Text Search Engine...
    >
    >Thanks for your reply!
    >
    >Laurent Allardin,MCP
    >Web Analyst/Developer
    >BuroPLUS
    >
    >
    >

    I think this should work

    Select *
    from Table
    where contains(Table.*,'"Week*"') OR contains (Table.*,'"*week"')

    are you sure however of the spelling of week? The database is case sensitive
    and will differentiate between Week and week if this is relative you may
    need to extend the OR expression further.




  3. #3
    Laurent Allardin Guest

    Re: Contains & Full-Text Search


    Thanks Paul for the reply,

    But even contains(Table.*,'"*week"') don't work!!!

    From the SQL Books Online

    <prefix_term>
    Specifies a match of words or phrases beginning with the specified text.
    Enclose a prefix term in double quotation marks () and an asterisk (*)
    before the ending quotation mark.

    So I guess that's a feature not implemented...

    Laurent Allardin


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center