Hi I would update row based on the same table. Copy column "data" to every row where data is "" (empty). "Key" in this rows is the same.
id |data |key
----|-----|-----
1 | xyz |key1
----|-----|-----
2 | "" |key1
I've tried something like that, but "relation a does not exists":
UPDATE a
SET a.data = b.data
FROM table a
INNER JOIN table b
ON (a.key = b.key)
WHERE b.data != '""'