Quick Search:
CODE
Oracle PL/SQL Code Library
JOBS
Find Or Post Oracle Jobs
FORUM
Oracle Discussion & Chat
 The Oracle PL/SQL SYS_DBURIGEN Function      [Return To Index] Jump to:  
  Looking for the original pages? (formerly called "Morgan's Library") You can find them here.

Term: SYS_DBURIGEN

Definition:
In Oracle PL/SQL, SYS_DBURIGEN is a built in function which is used to generate a URL for a row object in a table. It accepts column name, an attribute name, and an optional rowid to generate the URL of DBURIType. The URL can then be used to retrieve an XML document from the database. This URL is similar to XML path which is used to retrieve a row from an XML document in the database. Note that the input column or attribute name must belong to the same table. If you want the URL to point only to the text of the document, then specify the optional 'text()' parameter.

Example Syntax:

SYS_DBURIGEN ([column | attribute | rowid],, ' text ( ) ')


In the syntax, 'text()' is used if URL has to point to the text in the XML document.

Example Usage:

The SQL example below generates the URL for ENAME column of EMP table:

SQL> SELECT SYS_DBURIGEN(ENAME, JOB)
FROM EMP
WHERE EMPNO=100;

SYS_DBURIGEN(ENAME,JOB)(URL, SPARE)
--------------------------------------------------------------------------------
DBURITYPE('/PUBLIC/EMPLOYEE/ROW[ENAME=''JOHN'']/JOB', NULL)



The SQL example below generates the URL for ENAME column of EMP table and pointing to the 'text()' contained by JOB column:

SQL>  SELECT SYS_DBURIGEN(ENAME, JOB,'TEXT()')
FROM EMP
WHERE EMPNO=100

SYS_DBURIGEN(ENAME,JOB,'TEXT()')(URL, SPARE)
--------------------------------------------------------------------------------
DBURITYPE('/PUBLIC/EMPLOYEE/ROW[ENAME=''JOHN'']/JOB/text()', NULL)



Related Links:
 
Home      :      Code Library      :      Sponsors      :      Privacy      :      Terms of Use      :      Contact Us 193 users online    © 2009 psoug.org
PSOUG LOGIN
Username: 
Password: 
Forgot your password?