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
escription/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.
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
'xmlns:caml="= '20030AB__000799INT' -- An element that acts as a doc id
The above query gives me only only the document, but its location.