UPDATE "Dataset" AS dataset
SET "Status" = 2
WHERE dataset."ID" in (
	SELECT dataset1."ID"
	FROM "Dataset" AS dataset1
	INNER JOIN "DMP" AS dmp ON dmp."ID" = dataset1."DMP"
	WHERE dmp."isPublic" = true AND dataset1."Status" = 0
)