Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how to escape the special character ' (ascii 39) in a select query?

35491Jun 17 2002 — edited Nov 18 2005
Hi,
does anybody know how to escape the special character ' (ascii 39) in a select query?
I've tried a lot of ways but nothing seems to work, for example I try to get all
names in table foo where coloumn name contains a '-sign (ascii 39)
select name from foo where name like '%\'%';
select name from foo where name like '%{'}%';
select name from atg_horse where name like '%chr(39)%'

... but neither works, I end up with a ORA-01756: quoted string not properly terminated
I would apriciate any help
/Carl-Michael

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 16 2005
Added on Jun 17 2002
8 comments
853 views