I have a xml structure in my database like so:
<ArrayOfContactDetails xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<ContactDetails id="93679d1d-9feb-45d1-8356-e85d188fa34c">
<contactid>93679d1d-9feb-45d1-8356-e85d188fa34c</contactid>
<contactname>Name 1</contactname>
<contactemail>Email 1</contactemail>
<contactphonenumber>123234234</contactphonenumber>
</ContactDetails>
<ContactDetails id="69f54067-edf9-414e-80b6-099ac471dc43">
<contactid>69f54067-edf9-414e-80b6-099ac471dc43</contactid>
<contactname>Name 2</contactname>
<contactemail>Email 2</contactemail>
<contactphonenumber>123234234</contactphonenumber>
</ContactDetails>
<ContactDetails id="93144086-be1c-4f34-a5f7-6e8ac67c2121">
<contactid>93144086-be1c-4f34-a5f7-6e8ac67c2121</contactid>
<contactname>Name 3</contactname>
<contactemail>Email 3</contactemail>
<contactphonenumber>123456</contactphonenumber>
</ContactDetails>
</ArrayOfContactDetails>
And I'm trying to delete a ContactDetails node based on the ContactDetails id attribute. But I seem to be running into a brick wall.
My SP code is like so
UPDATE tableName
SET tableField.modify('delete //ContactDetails[@id=sql:variable("@contactId")]')
WHERE tableId = @tableId
I get no errors on the page or when debugging/executing the sp and its just driving me insane as to why its not working!!
Thanks, Tom