0
XQuery 및 MarkLogic에 새로 추가 된 다음 명령문의 XQuery 버전은 무엇입니까?XQuery를 사용하여 한 필드의 값을 다른 필드로 설정하는 방법
update all_the_records
set B_field = A_field
where B_field is null and A_field is not null
XQuery 및 MarkLogic에 새로 추가 된 다음 명령문의 XQuery 버전은 무엇입니까?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() })
내가 같이 그 일을 결국 사실, 내 가정은 두 노드가 노드 교체 ($ btag, $의 A/텍스트() ) 존재했다 –
nightograph