Oracle DBMS_XQUERY
Version 12.1.0.2

General Information
Library Note Morgan's Library Page Footer
The Library is currently in the process of being upgraded from Oracle Database Version 12.1.0.1 to 12.1.0.2. Demos are being upgraded to reflect the new Container paradigm as well as EBR (Edition Based Redefinition) and may contain references to CDBs, PDBs, and other objects you may not be familiar with such as CDB_OBJECTS_AE: Welcome to 12c.

Interested in Oracle GoldenGate? Check out the IGGOUG,
Purpose Database support for XQuery
AUTHID CURRENT_USER
Dependencies
XMLTYPE    
Documented No
First Available 11.2.0.1
Security Model Owned by SYS with EXECUTE granted to PUBLIC
Source {ORACLE_HOME}/rdbms/admin/initxqry.sql
 
EVAL
Undocumented dbms_xquery.eval(xqry IN VARCHAR2) RETURN XMLTYPE;
conn uwclass/uwclass@pdbdev

set serveroutput on

DECLARE
 inval VARCHAR2(200) := '''FOR $i IN /PDRecord where $i /PDName = "Daniel Morgan" ORDER BY $i/PDName return $i/PDName'' PASSING BY VALUE person_data';
 retval XMLTYPE;
BEGIN
  retval := dbms_xquery.eval(inval);
END;
/

DECLARE
 inval  VARCHAR2(200) := 'FOR $i IN /PDRecord where $i /PDName = "Daniel Morgan" ORDER BY  $i/PDName return $i/PDName';
 retval XMLTYPE;
BEGIN
  retval := dbms_xquery.eval(inval);
END;
/

Related Topics
Packages
XMLQUERY

Morgan's Library Page Footer
This site is maintained by Dan Morgan. Last Updated: This site is protected by copyright and trademark laws under U.S. and International law. © 1998-2014 Daniel A. Morgan All Rights Reserved