Results 1 to 3 of 3

Thread: Query Issue

  1. #1
    Join Date
    Sep 2003
    Posts
    69

    Unanswered: Query Issue

    If you have an apostrophy in a field and you want to query it like so:

    SELECT xyz
    FROM table
    WHERE something = ' '<?'

    Note that the second apostrophy is terminating the string, so how do I escape that second apostrophy?

    Thanks
    (SQL Server 7)

  2. #2
    Join Date
    Oct 2003
    Posts
    84
    When you want an apostrophe in your string, type in two apostrophe's.

    in your example:
    <?' would give you '<?''' (Start quote, your double quote...which is part of the search string, and an ending quote)

  3. #3
    Join Date
    Sep 2003
    Posts
    69
    Ah OK just like VB! Thanks!

Posting Permissions

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