![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have id and xml columns in mytable. I want to update an element called myelement with the following UPDATE MyTable SET xml.modify ('replace value of (/root/child/grandchild/myelement)[1] with xs:dateTime("2002-05-30T09:30:10Z")') WHERE id = '00000000-0000-0000-0000-000000000000' But I got XQuery [mytable.xml.modify()]: The target of 'replace value of' must be a non-metadata attribute or an element with simple typed content, found 'element(myelement,xdt:untyped) ?' If I removed "[1]" in the query, I got XQuery [mytable.xml.modify()]: The target of 'replace' must be at most one node, found 'element(myelement,xdt:untyped) *' I am sure it has only one instance of the element in the xml with the given id. What is the problem? |
#3
| |||
| |||
|
|
I have id and xml columns in mytable. I want to update an element called myelement with the following UPDATE MyTable SET xml.modify ('replace value of (/root/child/grandchild/myelement)[1] with xs:dateTime("2002-05-30T09:30:10Z")') WHERE id = '00000000-0000-0000-0000-000000000000' But I got XQuery [mytable.xml.modify()]: The target of 'replace value of' must be a non-metadata attribute or an element with simple typed content, found 'element(myelement,xdt:untyped) ?' If I removed "[1]" in the query, I got XQuery [mytable.xml.modify()]: The target of 'replace' must be at most one node, found 'element(myelement,xdt:untyped) *' I am sure it has only one instance of the element in the xml with the given id. What is the problem? |
#4
| |||
| |||
|
|
I have id and xml columns in mytable. I want to update an element called myelement with the following UPDATE MyTable SET xml.modify ('replace value of (/root/child/grandchild/myelement)[1] with xs:dateTime("2002-05-30T09:30:10Z")') WHERE id = '00000000-0000-0000-0000-000000000000' But I got XQuery [mytable.xml.modify()]: The target of 'replace value of' must be a non-metadata attribute or an element with simple typed content, found 'element(myelement,xdt:untyped) ?' If I removed "[1]" in the query, I got XQuery [mytable.xml.modify()]: The target of 'replace' must be at most one node, found 'element(myelement,xdt:untyped) *' I am sure it has only one instance of the element in the xml with the given id. What is the problem? |
#5
| |||
| |||
|
|
I have id and xml columns in mytable. I want to update an element called myelement with the following UPDATE MyTable SET xml.modify ('replace value of (/root/child/grandchild/myelement)[1] with xs:dateTime("2002-05-30T09:30:10Z")') WHERE id = '00000000-0000-0000-0000-000000000000' But I got XQuery [mytable.xml.modify()]: The target of 'replace value of' must be a non-metadata attribute or an element with simple typed content, found 'element(myelement,xdt:untyped) ?' If I removed "[1]" in the query, I got XQuery [mytable.xml.modify()]: The target of 'replace' must be at most one node, found 'element(myelement,xdt:untyped) *' I am sure it has only one instance of the element in the xml with the given id. What is the problem? |
#6
| |||
| |||
|
|
I have id and xml columns in mytable. I want to update an element called myelement with the following UPDATE MyTable SET xml.modify ('replace value of (/root/child/grandchild/myelement)[1] with xs:dateTime("2002-05-30T09:30:10Z")') WHERE id = '00000000-0000-0000-0000-000000000000' But I got XQuery [mytable.xml.modify()]: The target of 'replace value of' must be a non-metadata attribute or an element with simple typed content, found 'element(myelement,xdt:untyped) ?' If I removed "[1]" in the query, I got XQuery [mytable.xml.modify()]: The target of 'replace' must be at most one node, found 'element(myelement,xdt:untyped) *' I am sure it has only one instance of the element in the xml with the given id. What is the problem? |
#7
| |||
| |||
|
|
I have id and xml columns in mytable. I want to update an element called myelement with the following UPDATE MyTable SET xml.modify ('replace value of (/root/child/grandchild/myelement)[1] with xs:dateTime("2002-05-30T09:30:10Z")') WHERE id = '00000000-0000-0000-0000-000000000000' But I got XQuery [mytable.xml.modify()]: The target of 'replace value of' must be a non-metadata attribute or an element with simple typed content, found 'element(myelement,xdt:untyped) ?' If I removed "[1]" in the query, I got XQuery [mytable.xml.modify()]: The target of 'replace' must be at most one node, found 'element(myelement,xdt:untyped) *' I am sure it has only one instance of the element in the xml with the given id. What is the problem? |
#8
| |||
| |||
|
|
I have id and xml columns in mytable. I want to update an element called myelement with the following UPDATE MyTable SET xml.modify ('replace value of (/root/child/grandchild/myelement)[1] with xs:dateTime("2002-05-30T09:30:10Z")') WHERE id = '00000000-0000-0000-0000-000000000000' But I got XQuery [mytable.xml.modify()]: The target of 'replace value of' must be a non-metadata attribute or an element with simple typed content, found 'element(myelement,xdt:untyped) ?' If I removed "[1]" in the query, I got XQuery [mytable.xml.modify()]: The target of 'replace' must be at most one node, found 'element(myelement,xdt:untyped) *' I am sure it has only one instance of the element in the xml with the given id. What is the problem? |
#9
| |||
| |||
|
|
I have id and xml columns in mytable. I want to update an element called myelement with the following UPDATE MyTable SET xml.modify ('replace value of (/root/child/grandchild/myelement)[1] with xs:dateTime("2002-05-30T09:30:10Z")') WHERE id = '00000000-0000-0000-0000-000000000000' But I got XQuery [mytable.xml.modify()]: The target of 'replace value of' must be a non-metadata attribute or an element with simple typed content, found 'element(myelement,xdt:untyped) ?' If I removed "[1]" in the query, I got XQuery [mytable.xml.modify()]: The target of 'replace' must be at most one node, found 'element(myelement,xdt:untyped) *' I am sure it has only one instance of the element in the xml with the given id. What is the problem? |
#10
| |||
| |||
|
|
I have id and xml columns in mytable. I want to update an element called myelement with the following UPDATE MyTable SET xml.modify ('replace value of (/root/child/grandchild/myelement)[1] with xs:dateTime("2002-05-30T09:30:10Z")') WHERE id = '00000000-0000-0000-0000-000000000000' But I got XQuery [mytable.xml.modify()]: The target of 'replace value of' must be a non-metadata attribute or an element with simple typed content, found 'element(myelement,xdt:untyped) ?' If I removed "[1]" in the query, I got XQuery [mytable.xml.modify()]: The target of 'replace' must be at most one node, found 'element(myelement,xdt:untyped) *' I am sure it has only one instance of the element in the xml with the given id. What is the problem? |
![]() |
| Thread Tools | |
| Display Modes | |
| |