...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
UPDATE nested_tree_objects SET parentid='--some UUID of valid parent--' WHERE objectid IN (select objectid from nested_tree_objects where parentid NOT IN (select objectid from nested_tree_objects)) AND (parentid is not null or parentid <> '') |