Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Single Quote Escape Character

Posted on 2008-10-17
2
Medium Priority
?
3,903 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 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Simulator games are perfect for generating sample realistic data streams, especially for learning data analysis. It is even useful for demoing offerings such as Azure stream analytics, PowerBI etc.
Did you know there are services out there that can turn an Instagram feed into an RSS feed? I found some interesting exclusive Instagram content which I wanted to follow without signing up for yet another social media account. RSS to the rescue!
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…

824 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