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

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -