I am trying to update a document with a value from another document, but it doesn’t seem to be working…
update ug01 set sensorId = (select s.sensorId from ug01 s where s.locationDocKey = meta().id and s.type = 'sensor' and s.tenantId is valued) where type = 'sensor_location' and tenantId is valued
The “sensor” doc contains the “sensor_location” doc’s ID, so I can do a join of sorts… however, when I try that in the sub query, I get the following error:
Error evaluating SET clause. - cause: FROM in correlated subquery must have USE KEYS clause: FROM ug01.