locked
CONTAINS(TABLE) returns strange results RRS feed

  • Question

  • Hello,

     

    I got a problem with a T-SQL: I have a integrated search in my website that returns strange results. Wanting to search in every column in table NEWS, I use the CONTAINSTABLE command for my search. The tables I'm searching into got text with the name STEVEN.

     

    My search SQL:

    SELECT search.rank, *

    FROM news AS news INNER JOIN

    CONTAINSTABLE(news, *, 'query') AS search

    ON news.newsid = search.[KEY]

     

    Using as query "steven" I got 24 results!

    Using as query "stev" I got no results, so I do the prefix search...

    Using as query "ste*" I got 24 results again!

     

    Using as query "steven.steven" I got no results, because this string is NOT in the table!

     

    Using as query "steven.steven*" I got 3 results... WHY??????

     

    I'm confused! Please can help me anyone... I don't understand what's happening!

     

    Thanks for reply,

    Steven

    Monday, July 28, 2008 2:03 PM

All replies

  • No ideas what this strange behaviour could be?!

    Tuesday, July 29, 2008 8:35 AM