Update and replace query error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Vinay Gawli
    New Member
    • Dec 2010
    • 1

    Update and replace query error

    i am unable to update the data in a table which is has a quotation with string ie, " Sultan chand"s " but it is giving the error message

    Msg 102, Level 15, State 1, Line 2
    Incorrect syntax near 'CHAND'.
    Msg 105, Level 15, State 1, Line 2
    Unclosed quotation mark after the character string 'S COMPANY
    '.

    how can i update or replace the data with "Sultan chands" please help me
    i am using sql server 2005
  • gpl
    New Member
    • Jul 2007
    • 152

    #2
    You need to double the quotes within a string for it to be seen as a quote and not end of string
    Try this
    " Sultan chand""s "

    Comment

    Working...