Cita:
"Error SQL: ORA-01779: cannot modify a column which maps to a non key-preserved table
01779. 00000 - "cannot modify a column which maps to a non key-preserved table"
*Cause: An attempt was made to insert or update columns of a join view which
map to a non-key-preserved table.
*Action: Modify the underlying base tables directly."
01779. 00000 - "cannot modify a column which maps to a non key-preserved table"
*Cause: An attempt was made to insert or update columns of a join view which
map to a non-key-preserved table.
*Action: Modify the underlying base tables directly."
Código SQL:
Ver original
UPDATE ( SELECT x.kpi_bueno AS old_bueno, y.valor AS new_bueno FROM kpi_detalle x INNER JOIN ( SELECT a.cod_area_empr,a.cod_cargo_pers,a.cod_pers,a.vkpi_fec_medida,SUM(vkpi_valor) AS valor FROM vkpi_vector a LEFT JOIN dkpi_vector b ON b.dkpi_vector_id = a.dkpi_vector_id WHERE b.ind_estado='B' GROUP BY a.cod_area_empr,a.cod_cargo_pers,a.cod_pers,a.vkpi_fec_medida ) y ON x.cod_area_empr=y.cod_area_empr AND x.cod_cargo_pers = y.cod_cargo_pers AND x.cod_pers = y.cod_pers AND x.vkpi_fec = y.vkpi_fec_medida ) SET old_bueno = new_bueno;