Oracle9i SQL Reference Release 2 (9.2) Part Number A96540-02 |
|
|
View PDF |
sys_dburigen::=
SYS_DBURIGen
takes as its argument one or more columns or attributes, and optionally a rowid, and generates a URL of datatype DBURIType
to a particular column or row object. You can then use the URL to retrieve an XML document from the database.
All columns or attributes referenced must reside in the same table. They must perform the function of a primary key. That is, they need not actually match the primary keys of the table, but they must reference a unique value. If you specify multiple columns, then all but the final column identify the row in the database, and the last column specified identifies the column within the row.
By default the URL points to a formatted XML document. If you want the URL to point only to the text of the document, then specify the optional 'text()
'. (In this XML context, the lowercase 'text
' is a keyword, not a syntactic placeholder.)
If the table or view containing the columns or attributes does not have a schema specified in the context of the query, then Oracle interprets the table or view name as a public synonym.
See Also:
Oracle9i XML API Reference - XDK and Oracle XML DB and Oracle9i XML Developer's Kits Guide - XDK for information on the |
The following example uses the SYS_DBURIGen
function to generate a URL of datatype DBURIType
to the email
column of the row in the sample table hr.employees
where the employee_id
= 206:
SELECT SYS_DBURIGEN(employee_id, email) FROM employees WHERE employee_id = 206; SYS_DBURIGEN(EMPLOYEE_ID,EMAIL)(URL, SPARE) -------------------------------------------------------------------- DBURITYPE('/PUBLIC/EMPLOYEES/ROW[EMPLOYEE_ID=''206'']/EMAIL', NULL)