Example: Direct XML Import Verifying the Original Values

Previous Next

Here is an example of a direct XML import that verifies the original values. This is specified by the VerifyOriginalValues parameter:

INVOKE    XML.Import

WITH

SELECT    '<Persons>

             <PERSON ID="112" FAMILY_NAME="Smith" FIRST_NAME="John">

               <Update FIRST_NAME="Johnny"/>

             </PERSON>

             <PERSON ID="203" FAMILY_NAME="Sutcliff" FIRST_NAME="Bill"/>

               <Delete/>

             </PERSON>

           </Persons>' XmlDocument

,         'AllColumns' VerifyOriginalValues

 

Before the first PERSON record will be updated and the second PERSON record will be deleted, first all column values in the database are compared with the values mentioned in the XmlDocument string.