[xquery-talk] Help required for XQuery - nested inner joins
amy.gordon at unisa.edu.au
Thu Aug 25 13:24:19 PDT 2005
I'm trying to convert a rather complex SQL query into XQuery format (the
relational database is currently being viewed as an XML file). However
the solution that I've come up with doesn't seem to take into account
the nature of the inner joins in the SQL query since I've got too many
result entries in the output file.
Here's the SQL query I'm trying to convert:
FROM ACTIVITIES_ITS_VESSEL INNER JOIN
And here's my current code (that's giving more results than the SQL
xquery version "1.0";
for $act in doc("test4.xml")//ACTIVITIES_ITS_VESSEL,
$vds in doc("test4.xml")//VESSELSDATASHEET,
$sch in doc("test4.xml")//SCHEDULE_ITS_VESSEL
$act/Vessel_Equipment_ID = $vds/Vessel_Equipment_ID
and $act/Vessel_Equipment_ID = $sch/Vessel_Equipment_ID
and $act/Activity_Number = $sch/Activity_Number
I somehow need to get the inner joins in there but have no idea how.
Any prompt help would be much appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the talk