Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2003
    Location
    France
    Posts
    21

    Unanswered: how to find a simple quote in a row

    Hi,
    I have a table with a "description" row.
    In this row I may have some simple quote (') character.
    How can I select them ?

    something like :
    select * from myTable where description like %'%

    thanks

  2. #2
    Join Date
    Mar 2005
    Posts
    1

    '

    select * from myTable where description like %''%

    Use TWO single quotes. They are treated as one.

  3. #3
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    don't forget the quotes around the pattern

    ... where description like '%''%'
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  4. #4
    Join Date
    Oct 2003
    Posts
    357
    Other alternative is

    select * from tableName where charindex('''',Colname)>0
    Madhivanan

    Failing to plan is Planning to fail

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •