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!

CLOB - ampersand character

Dev_SQLNov 13 2019 — edited Nov 13 2019

Hi All,

In my CLOB data, I've the HTML contents with '&' character, it has a special meaning in Oracle, like it prompts to input data from the user, how do we suppress this, like we use Escape character in the LIKE operator as shown below? Could you please share your views? Thank you.

select to_clob('<html><body>Test Data &Parameter</body></html>') from dual;

with a(col1)

as

(select '<html><body>Test Data %Parameter</body></html>' from dual

union

select '<html><body>Second Row</body></html>' from dual)

select * from a

where col1 like '%\%%' escape '\';

This post has been answered by Paulzip on Nov 13 2019
Jump to Answer
Comments
Post Details
Added on Nov 13 2019
4 comments
1,707 views