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!

Unescape of special characters < and > in Oracle sql

User_1KK7KDec 12 2020

Hi,
I am storing in my Oracle SQL database table string field with tag values having '<' and '>'. when I try to to retrieve them for Xmlhttp request the values displayed are '&lt' and '&gt'. How can I prevent this conversion and display '<' and '>' symbols?
I used the following functions that I found but did not work(Also tried using xmlgen but it did not work form me)

select UTL_I18N.UNESCAPE_REFERENCE(string_field) from test where id='123'

Here the string_field column of test table of type Char has the value <test><tags>ABC<test><tags> and I want to display the same value with out < and > being replaced by &lt and &gt.
How is it possible?

Comments
Post Details
Added on Dec 12 2020
3 comments
3,701 views