How do I ignore punctuation?

  • Just as the title suggests, how do I ignore punctuation in an SQL query using full txt searching?

    Say if I wanted to search on:

    O'brien

    or

    Mary's Hat.

    I would expect that the search engine would look for:

    Obrien OR O'brien

    and

    Marys hat OR Mary's Hat.

    Im using SQL 2005

  • Hi Mark,

    You're best bet is to run the search input through a function that replaces all punctuation with '%' to give you a string that is suitable for the like operator.

    Good luck!

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

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