由于我们的一个 Java 应用程序重复出现错误:
Engine engine_0: Error in application action.
org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x13)
was found in the element content of the document.
我需要“修复”Oracle 数据库中的某些 Unicode 字符,最好以编程方式进行。一旦确定,“搜索和替换”它的简单方法是什么?
最佳答案
假设字符出现在文本字段中:
update TABLE set COLUMN=REPLACE(convert(varchar(5000), COLUMN), 'searchstring', 'replacestring')
(请注意,这仅适用于不超过 5000 个字符的文本字段,对于较大的文本字段,请增加查询中的数字)。
关于java - 如何在 Oracle 8.x 系列中以编程方式替换字符,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64875/