如何使用SQL Developer中的简单转换功能来更新Clob数据类型的XML数据。
显示表格:
Select * from AmanTest;
要更新字段:
Update AmanTest Set fULLName = 'Aman 1991'; commit;
替换字符(屏蔽):
Update AmanTest Set fULLName = Translate(FullName,'amnA19','artA50'); commit;
运行查询
Output- 'Arat 5005'
问题陈述:我想以XML格式更新数据:
<oip:process xmlns:oip="http://xyz.com.au/GoldSendEmail/OIPSendEmailService">
<oip:fromEmailAddress>[email protected]</oip:fromEmailAddress>
<oip:toEmailAddress>[email protected]</oip:toEmailAddress>
<oip:ccEmailAddress />
<oip:emailSubject>SCI premium waiver - 111179657</oip:emailSubject>
<oip:emailBody>
Member Number: 111179657
Claim Number: CLM-55
Member Name: Aman Usrete
Thank you,
Health Claims Team
</oip:emailBody>
特别是,我想更新电子邮件地址和会员名称。
如果XML日期存储在CLOB中,则可以执行以下操作:
UPDATE AmanTest att
SET att.xml_col =
XMLSERIALIZE(CONTENT
UPDATEXML(XMLTYPE(att.xml_col),
'/Process/toEmailAddress/text()',
'[email protected]')
AS CLOB INDENT);