Filtering strings

  • how do i filter a TSQL string such as >> St. Ann's

  • What exactly do you mean, filter to remove from the string, filter to remove / include from a return set?

  • Yes, i want it to be remove from the result set

     

  • well, you could do something like 'not in'

    select names from list where names not in ('foo','bar','qwerty')

    or

    select names from list where names not in (select excludenames from filtertable)

     

  • have you tested it with:  in ('St. Ann's')

    the extra apostrophe is causing the prob

     

  • Denby, to put apostrophes in strings, you "escape" them by doubling them up.

    Try:

    in ('St. Ann''s')

  • ok man thx

     

Viewing 7 posts - 1 through 6 (of 6 total)

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