Skip to Main Content

SQL & PL/SQL

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 do i replace single quotes in a string with say '' or null

677593Sep 23 2010 — edited Sep 23 2010
note : this is just an example ... i get a string like this from a DB column.

example :

v_string varchar2(10) : = 'ab'cd'; ---- this is the example for a string from a DB column.

v_out_string varchar2(10) := 'ab''cd'; ---- this is the example for the output expected

v_out string varchar2(10) := 'ab cd'; ---- this is another example for the output expected

scenarios to be considered are given below

This should happen in a loop for the various values retrieved from a column. A value from a column might have many single quotes in it.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 21 2010
Added on Sep 23 2010
6 comments
38,203 views