Hi Ivan,

 
I have the following xquery:
collection("col_name")[Main/UniqueCode="s145"]
It returns full contents of the document.
Please advise how I can get this document's name ("something.xml")?

Use document-uri function:

document-uri(collection("col_name")[Main/UniqueCode="s145"]) 

It will return name of the document in the database.


Ivan Shcheklein,
Sedna Team