XML Oracle CROSS JOIN

时间:2015-09-17 13:50:10

标签: xml oracle join plsql cross-join

我在Oracle中传输XML文件内容时遇到问题。 我能够从存储在表中的XML文件中提取值。 当我混合水平时,问题与正确提取数据有关。

这里是我使用的代码:

select count(*)

from testtable2 t
cross join  xmltable(xmlnamespaces(default 'http://xxxxxxxxxxxxxxxxxx'),
 'records/REC'
  passing t.xml_file 
  columns 
          CD_UID varchar2(200) path 'UID',
        --     names xmltype path 'static_data/summary',
          identifi xmltype path 'dynamic_data/cluster_related'

) RecUid


cross join  xmltable(xmlnamespaces(default 'http://xxxxxxxxxxxxxxxxxx'),
  'cluster_related/identifiers/identifier[@type="issn"]'
  passing RecUid.identifi
  columns 
     CD_ISSN_NO varchar2(200) path '@value'
    )   Issn  ;

预期结果是20471,但与Issn合并我只得到18896行。 我想这意味着它只考虑我的CD_ISSN_NO不为空的记录,但在这种情况下我应该使用哪个正确的代码?

谢谢!

0 个答案:

没有答案