SQL Full text search Select statement

  • Hi,

    I am doing a web app on the full text search.

    My select statement using CONTAINS but it doesn't seem to return all the string that contains the search word I included in the query.

    For example:

    Select CustomerID, customername,

    from CustomerTable

    where CONTAINS ((CustomerID), '"430*")

    the query result only return all customer id which has space in front 430 or start with 430

    ex: "xxx 430xxx" or "430 xxx" or "xxx 430 xxx"

    but did not return customerID which doesn't has space in front of it

    Ex: x430xxx

    If I use LIKE '%430%', the result return are both have space in front and don't have space in front.

    Please advise how can I do this using CONTAINS.

    Thanks,

    Dee

  • You used wildcard %430% in like so why not use in contains WHERE CONTAINS(CustomerID, '"*' 430 '*"')

    Alex S

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply