Escape sequence

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mark

    Escape sequence

    I have a query I use to validate that there are no other records with
    the same descriptions - a table for items.

    Now the querry ends up like this:

    SELECT COUNT(ITMID)
    AS COUNT
    FROM
    TBLITEM
    WHERE
    ITMDESCRIPTION = '26g Galvalum Wide - Flat Sheet's'
    AND
    ITMID != 707

    Where the 707 refers to itself. But the Sheet's' will not work. Says
    "ORA-00933: SQL command not properly ended".

    Can someone help me with this? is there a way to escape the '?

    Thank you,
    Mark

  • LKBrwn_DBA

    #2
    Re: Escape sequence


    Try this:



    TMDESCRIPTION = '26g Galvalum Wide - Flat Sheet''s'



    (use two single quotes together).



    :D


    --
    Posted via http://dbforums.com

    Comment

    • Mark

      #3
      Re: Escape sequence

      LKBrwn_DBA wrote:
      Try this:
      >
      >
      >
      TMDESCRIPTION = '26g Galvalum Wide - Flat Sheet''s'
      >
      >
      >
      (use two single quotes together).
      >
      >
      >
      :D
      >
      >
      --
      Posted via http://dbforums.com
      I have tried it, and it still does not work.

      After posting I realized that it's a bad example. Sheet's would never
      be used, but everyone should get the point.

      I have tried the /, using '' or ''', and it all does not work.

      Comment

      Working...