【发布时间】:2016-11-07 14:47:17
【问题描述】:
有没有办法将原始 xml 数据导入(或加载)到具有 xml 类型列的表中。
<customerinfo Cid="1000"><name>Kathy Smith</name><addr country="Canada"><street>5 Rosewood</street><city>Toronto</city><prov-state>Ontario</prov-state><pcode-zip>M6W 1E6</pcode-zip></addr><phone type="work">416-555-1358</phone></customerinfo>
<customerinfo Cid="1001"><name>Kathy Smith</name><addr country="Canada"><street>25 EastCreek</street><city>Markham</city><prov-state>Ontario</prov-state><pcode-zip>N9C 3T6</pcode-zip></addr><phone type="work">905-555-7258</phone></customerinfo>
...
xml 文档的每一行都应该排成一行。
import from C:\temp\test.xml OF DEL INSERT INTO XMLCOLUMN
DB2 正确读取 XML 文件,但未能将其导入行...
Number of rows read = 6
Number of rows skipped = 0
Number of rows inserted = 0
Number of rows updated = 0
Number of rows rejected = 6
Number of rows = 6
有什么想法吗?
【问题讨论】:
-
一个想法可能是检查实际的错误消息,准确地解释为什么这些行被拒绝。
-
我基本上说它缺少一个 xsd 文件
标签: xml import db2 load db2-luw