Tuesday, 24 March 2015

ORA-01779 cannot modify a column which maps to a non key-preserved table


Cause --
1. Query cannot update the query, because XXMAX_TRANSACT_QTY is a view, created by multiple tables.




   FROM mtl_onhand_lot_new_v     moqd,
   mtl_lot_numbers          mln,
   mtl_system_items_b       mtl,

2.  An attempt was made to insert or update columns of a join view which map to a non-key-preserved table.


BEGIN
   UPDATE APPS.XXMAX_TRANSACT_QTY
      SET ACTUAL_GSM = ''
    WHERE     LOT_NUMBER = '130921-0302-13440-9101'
          AND ORGANIZATION_ID = '103'
          AND GEN_OBJECT_ID = '5458047';

   COMMIT;
END;


Trouble Shooting
Action: Modify the underlying base tables directly.