简体   繁体   中英

How to update column by a long char in Oracle12c

I want to update an HTML format, but the HTML format is too long to update. Furthermore, there are functions in this HTML format. it seems that Oracle recognized the characters as the replace() function

UPDATE DS_ADPRODSET_FREETAG
SET html='<script type="text/javascript">
(function(){function c(g){return g.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function b(h,n){var j={};var l=h.split(n);if(l.length!=2){return j}var m=l[1].split("&");for(var k=0;k<m.length;k++){var g=m[k].split("=");if(g.length==1){j[g[0]]=""}else{j[g[0]]=c(window.decodeURIComponent(g[1]))}}return j}function e(g){var h=/^(http:\/\/i\.yimg\.jp|https:\/\/s\.yimg\.jp)\/images\/listing\/tool\/yads\/yads-iframe.*\.html/;return h.test(g)}var a=(function(){v
ar k="14467902";var j;if(e(window.location.href)){j=window.location.href}else{try{if(e(window.parent.location.href)){j=window.parent.location.href}else{return k}}catch(i){return k}}var g=b(j,"?");if(typeof(g["sid"])!="undefined"&&g["sid"]!=""){return g["sid"]}var h=b(j,"#");if(typeof(h["sid"])!="undefined"&&h["sid"]!=""){return h["sid"]}return k})();var f=(location.protocol=="https:")?"https:":"http:";var d=f+"//yeas.yahoo.co.jp/a?f="+a+"&l=LREC2&p=jp&jcode=u&c=rp&domain=yimg.jp&rnd="+new Date()
.getTime();document.write("<sc"+'ript type="text/javascript" src="'+d+'">');document.write("</sc"+"ript>")})();
</script>'
WHERE adprodset_id=11111;

the Oracle asked me to replace the '&gt', but I just want the contents in XXX are characters.

What follows & is recognised a substitution variable in IDEs like SQL developer and SQL* Plus

Add SET DEFINE OFF before running the query.

Checkout this link to know more about substitution variable

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM