Oracle SQL*Loader 可以处理 XML 吗?

Can Oracle SQL*Loader process XML?(Oracle SQL*Loader 可以处理 XML 吗?)
本文介绍了Oracle SQL*Loader 可以处理 XML 吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Oracle 是否提供 XML 格式文件的标准化上传?我认为用于 XML 输出的规范格式结构 = ROWSET/ROW/columname 可以通过运行具有适当控制文件内容的 sqlldr 再次上传回表中.
但是我在网络上的任何地方都找不到任何关于此的信息,并且试验后的错误消息似乎表明只能将 XML 上传到 XML 类型格式的表格中,我只想在普通表格中上传数据但提供数据XML 格式.

Does Oracle offer a standardized upload of XML formatted files? I thought that the canonical format that is used for XML output, structure = ROWSET/ROW/columname, could be uploaded back into the table again, by just running sqlldr with appropriate control file contents.
But I cannot find anything about this anywhere on the web, and error messages after trials seem to indicate that it is only possible to upload XML into XML-type formatted tables, where I just want to upload data in a plain table but supply the data in XML format.

推荐答案

不,SQL*Loader 只能处理平面"文件.

No, SQL*Loader can only process "flat" files.

一种选择是编写一个 XSLT 转换,将 ROWSET/ROW/column 格式转换为文本文件,然后将其导入目标表.

One option is to write an XSLT transformation that turns the ROWSET/ROW/column format into a text file and then import that into the target table.

另一种选择是将 XML 导入单行,然后使用 Oracle 的 XML 函数从该临时表中选择一个关系结果并将其插入到实际表中.

Another option is to import the XML into a single row, and then use Oracle's XML functions to select a relational result from that staging table and insert it into the real table.

这篇关于Oracle SQL*Loader 可以处理 XML 吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

SQL to Generate Periodic Snapshots from Transactions Table(用于从事务表生成定期快照的SQL)
MyBatis support for multiple databases(MyBatis支持多个数据库)
Oracle 12c SQL: Missing column Headers in result(Oracle 12c SQL:结果中缺少列标题)
SQL query to find the number of customers who shopped for 3 consecutive days in month of January 2020(查询2020年1月连续购物3天的客户数量)
How to get top 10 data weekly (This week, Previous week, Last month, 2 months ago, 3 month ago)(如何每周获取前十大数据(本周、前一周、上个月、2个月前、3个月前))
Select the latest record for an Id per day - Oracle pl sql(选择每天ID的最新记录-Oracle pl SQL)