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

Term: EXISTSNODE

Definition:
The Oracle PL/SQL EXISTSNODE keyword is an XML Type member function which is used to check valid nodes corresponding to the specified XPath. It searches specific values at the node level. Essentially, EXISTSNODE determines whether or not the traversal of an XML document using a given path will result in any nodes. It returns one of the BOOLEAN values TRUE or FALSE.

The EXISTSNODE function is deprecated. It is still supported for backward compatibility, however, Oracle recommends that you use the XMLEXISTS function instead.


Example Usage:

The SELECT statement below checks an Order node in the ORDERS_XML table. It checks whether mail has been sent to a vendor by checking that whether or not the path "/Order/MailAddressTo/Company" exists for the condition "Company=Google".

SELECT COUNT(*) 
FROM ORDERS_XML
WHERE EXISTSNODE(
object_value, '/Order/MailAddressTo[Company="Google"]') = 1;

COUNT(*)
--------------
1


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