我正在处理遗留应用程序上的oracle db,并且很难为其提供一个特定的查询。
基本上,我有一个表T_Selected,它有一个数字列(主键)和一个and类型列。XML的格式是
<countries>
<country>England</country>
<country>Ireland</country>
<country>Scotland</country>
<country>Wales</country>
</countries>我还需要另一个表来查询和使用结果。
select country from T_Countries where language = 'English'我需要三个问题和他们的否定。
我得到的最接近的
select id from
T_Selected ts,
XMLTABLE('/countries/country'
passing ts.Values
columns
Country path '//country'
) XML
where XML.country in (select country from T_Countries
where language ='English');这将返回任何xml国家都在子查询中的in,而不是所有它们。
对我该怎么做有什么想法吗?
谢谢你的帮助,
尼尔
发布于 2013-05-28 00:25:21
https://stackoverflow.com/questions/16652473
复制相似问题