Update row with data from another row in the same table
Try this:
UPDATE data_table t, (SELECT DISTINCT ID, NAME, VALUE
FROM data_table
WHERE VALUE IS NOT NULL AND VALUE != '') t1
SET t.VALUE = t1.VALUE
WHERE t.ID = t1.ID
AND t.NAME = t1.NAME
Here's my go:
UPDATE test as t1
INNER JOIN test as t2 ON
t1.NAME = t2.NAME AND
t2.value IS NOT NULL
SET t1.VALUE = t2.VALUE;
EDIT: Removed superfluous t1.id != t2.id
condition.