对于XQuery和MarkLogic来说是非常新的,以下语句的XQuery版本是什么?
update all_the_records
set B_field = A_field
where B_field is null and A_field is not null
这样的事情可能会让您入门。但是请记住,您使用的是树木,而不是桌子。由于存在额外的维度,因此事情通常会更加复杂。
for $doc in collection()/doc[not(b)][a]
let $a as element() := $doc/a
return xdmp:node-insert-child($doc, element b { $a/@*, $a/node() })
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句