table join in xquery?
wannabeJan 9 2012 — edited Mar 8 2012I am using 11.2.0.1 database on a windows 2003 server.
I have simplified a set of data in order to ask this question.
create table MISCPARTS of XMLType
XMLTYPE store as BINARY XML;
The data looks something like this:
<myparts id="xxx">
<partsName>plate</partName>
<partsConfig>
<title>x section</title>
<link-sys id="00999"/>
........
<partConfig>
........
</myparts>
Another table:
create table PARTSSYSTEMS of XMLType
XMLTYPE store as BINARY XML;
Sample file may look like this:
<system id="8888">
<systemName>THIS</systemName>
<systemDescription> ksdflkjdsfjds </systemDescription>
........
</system>
I want to be able to select the title from the MISCPARTS, and the systemName,systemDescription from the partssystems table where the <link-sys id value in the miscParts is equal to the id in the system tag of the partssystems. (table joins)
My question is how do I do this with xquery? (I don't know how to get both of my tables in the xquery syntax.)