I have a table A. I want to insert column into xml.
I know '@x.modify('insert <a>{sql:column("XColumn")}</a>' into /') from A' is ok.
But how to insert dynamic node in xml?
'@x.modify('insert <{sql:column("XColumn")}>1</{sql:column("XColumn")}>' into /') from A' is error.
I can't find any workaround in docs.
So you will have to construct the XML you are inserting in SQL. For example:
Hope it's what you're looking for!