I'm trying to denormalise a "Country" document with "regionName" field corresponding to "name" of another "Region" document. My N1QL query is as below but it's not working
update test as t1 set regionName = (
select raw name from test as t2 where `_class`="Region"
) where `_class`="Country" and t1.regionCode=t2.code RETURNING *;
Any help?