Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Explicit join between an Xml Table and Path_View

Status
Not open for further replies.

CRoberts

MIS
Apr 14, 1999
70
US
Explicit join between an Xml Table and Path_View

I have an xml table(content is immaterial at this point) holding a fair number of documents(100000+), but the doc contents do not explicitly have an element for "file Name" or "Path". (Which is just as well as documents can be copied from one folder to another.) I want to use the Object_Id (sys_nc_oid$) from the xml table to join to the Path_View (maybe by ResId?). I had assumed the ResId and Object_id were the same, but they are not.

Is there a trick, transformation (whatever) where I can do something similar as below (Strangely, Object_Id and ResId seem to differ by just one bit) where I can explicitly join the xml table to the Path_View?:

SELECT p.Path,
p.ResId,
d.rowid,
d.object_id,
d.Object_Value.GetClobVal() AS Contents
FROM CAML_Measure_Doc_Tab d,
Path_View p
WHERE p.ResId = d.Object_Id -- This doesn't work, nice if it did
AND ExtractValue(Value(d),
'/caml:MeasureDoc/caml:Description/caml:Id/text()',
'xmlns:caml="= '20030AB__000799INT' -- An element that acts as a doc id

The above query gives me only only the document, but its location.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top