una sencilla con 2 querys:
tabla1 tabla produccion
tabla2 tabla intermedia o donde estan los datos antes de mandarlos a prod
Código SQL:
Ver originalINSERT INTO tabla1
SELECT * FROM tabla1 AS t1
LEFT JOIN tabla2 AS t2 ON (t1.id=t2.id)
WHERE tabla1.id IS NULL
UPDATE tabla1
SET tabla1.dato=test.dato
FROM
(
SELECT * FROM tabla1 AS t1
LEFT JOIN tabla2 AS t2 ON (t1.id=t2.id)
WHERE t1.id IS NOT NULL
) AS test WHERE tabla1.id=test.id
Saludos!