Solved

Single Quote Escape Character

Posted on 2008-10-17
2
3,865 Views
Last Modified: 2008-10-17
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
0
Comment
Question by:bowemc
2 Comments
 
LVL 19

Accepted Solution

by:
grant300 earned 500 total points
ID: 22741190
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
 

Author Comment

by:bowemc
ID: 22743092
The escape for a single quote is an additional single quote. >> Perfect :-), Thanks
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Short answer to this question: there is no effective WiFi manager in iOS devices as seen in Windows WiFi or Macbook OSx WiFi management, but this article will try and provide some amicable solutions to better suite your needs.
Get to know the ins and outs of building a web-based ERP system for your enterprise. Development timeline, technology, and costs outlined.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now