Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Single Quote Escape Character

Posted on 2008-10-17
2
Medium Priority
?
3,890 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 19

Accepted Solution

by:
grant300 earned 2000 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

Survive A High-Traffic Event with Percona

Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you are a mobile app developer and especially develop hybrid mobile apps then these 4 mistakes you must avoid for hybrid app development to be the more genuine app developer.
The online market is growing at an unprecedented rate and retail eCommerce sales are expected to reach $4 trillion by 2020. Yet, the profit is not just there for the taking because you have to set yourself apart from the competition.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

688 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