Quick Search:
 
 The EXISTSNODE Function      [Return To Index] Jump to:  

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 |    Search |    Code Library |    Sponsors |    Privacy |    Terms of Use |    Contact Us © 2003 - 2024 psoug.org