marklogic - How to set the value of one field to another filed in using XQuery -


very new xquery , marklogic, xquery version of following statement?

update all_the_records  set b_field = a_field  b_field null , a_field not null 

something might started. remember you're working trees, not tables. things more complicated because of dimension.

for $doc in collection()/doc[not(b)][a] let $a element() := $doc/a return xdmp:node-insert-child($doc, element b { $a/@*, $a/node() }) 

Comments

Popular posts from this blog

javascript - How to synchronize the Three.js and HTML/SVG coordinate systems (especially w.r.t. the y-axis)? -

javascript - How do I find how many occurences are there of a highlighted string, and which occurence is it? -

java - Reading data from multiple zip files and combining them to one -