Home > Software engineering >  Can we update html data of CLOB column by using SQL update?
Can we update html data of CLOB column by using SQL update?

Time:10-26

i have html code which i need to update in one clob column , how can i convert it in sql update string? My second question is that how to insert ® and & which exist in this html code.

<html>
<head>
<style></style>
</head>
<body>
     <div>
      <div align="center" style="font-size:11pt;font-family:Calibri,sans-serif;">
            <b> card<sup><font size='3'>&reg;</font></sup>  Card  Notification</b>
            <br />
        </div>
        <hr />
        <p style="font-size:11pt;font-family:Calibri,sans-serif;">
            The online statement for your  card provided by {company name} and issued by Com is now available. Select the Account Maint. &amp; Statement tab to view your statement.
        </p>
        <p style="font-size:10pt;font-family:Calibri,sans-serif;">
            Equal Opportunity Lender.
        </p>
        <p style="font-size:10pt;font-family:Calibri,sans-serif;">
            This Card is issued  International Incorporated.
        </p>
      </div>
  </body>
</html>  

CodePudding user response:

One option would be to use quotation. If you use sqlplus

set define off
update my table 
set my_clob_column = q'[ <html>
<head>
<style></style>
</head>
<body>
     <div>
      <div align="center" style="font-size:11pt;font-family:Calibri,sans-serif;">
            <b> card<sup><font size='3'>&reg;</font></sup>  Card  Notification</b>
            <br />
        </div>
        <hr />
        <p style="font-size:11pt;font-family:Calibri,sans-serif;">
            The online statement for your  card provided by {company name} and issued by Com is now available. Select the Account Maint. &amp; Statement tab to view your statement.
        </p>
        <p style="font-size:10pt;font-family:Calibri,sans-serif;">
            Equal Opportunity Lender.
        </p>
        <p style="font-size:10pt;font-family:Calibri,sans-serif;">
            This Card is issued  International Incorporated.
        </p>
      </div>
  </body>
</html>  ]' 
where ........... 
  • Related