我有这个文件,我需要取消设置orderState数组并将profileState设置为“AVAILABLE”。
我正在尝试这个N1QL语句,但它在END上抛出错误。
update ${BUCKET} as b unset b.orderState WHERE b.type = "ao.los:pro" and
profileInformation.iccid="${ICCID}" and profileInformation.customerId is not
missing limit 1 END, SET b.profileState="AVAILABLE" END returning *;
UPDATE default AS b
SET b.profileState="AVAILABLE" UNSET b.orderState
WHERE b.type = "ao.los:pro"
AND b.profileInformation.iccid = "ICCID"
AND b.profileInformation.customerId IS NOT MISSING
LIMIT 1
RETURNING *;
update的语法:https://docs.couchbase.com/server/6.0/n1ql/n1ql-language-reference/update.html