Skip to Main Content

APEX

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 possible single quote in plsql

Jian-cdoJan 12 2017 — edited Jan 13 2017

Hello,

I have this piece of code in the after header process.  The problem is the value by select may contains single quote, wonder how to handle it?  I mean P14_STUDY_SITE_NAME may contains single quote, how to escape it correctly?  Thanks very much!

begin

select :P14_STUDY_SITE_NAME|| ' -  '|| :P14_STUDY_SITE_NUM  into :P14_STUDY_SITE_INFO from dual;

end;

This post has been answered by Sven W. on Jan 13 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 10 2017
Added on Jan 12 2017
11 comments
1,117 views