Single Quote Escape Character

Hi,

I was wondering what the escape charater for a single quote is in Sybase. i'm trying to do the below update statemwnt and one of the strings contains a persons name with a single quote! Thanks

UPDATE DESK SET nm_contact = 'M O'Leary' where id_desk = 1
bowemcAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
grant300Connect With a Mentor Commented:
The escape for a single quote is an additional single quote.

The problem you will have is trying to escape single quotes on the fly.  There was another question about how to do that not too long ago and the best answer I could come up with was to use a recursive function.  Slow and not available prior to v15 unless you ahve the Java option bought and paid for in 12.x

I would take a much simpler approach: turn off quoted identifiers and use double quotes around the outside of the text.

Regards,
Bill
0
 
bowemcAuthor Commented:
The escape for a single quote is an additional single quote. >> Perfect :-), Thanks
0
All Courses

From novice to tech pro — start learning today.