Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Update multiple rows
Been working with Access and SQL Server for a long time. New to
Oracle.
I have two tables TableA & TableB.
TableA has EmployeeID (PK),Salary, StartDate
TableB has UserID, EmployeeID, Salary, StartDate (UserID,EmployeeID as
PK)
This allows multiple users to temporarily modify the salalaries in
table B
I then create a view:
select EmployeeID,Salary from TableB where UserID=USER
If I try to update the Salary and StartDates in TableA from the view, I receive the "ORA-01779: cannot modify a column which maps to a non key-preserved table"
This is an upgrade from an existing schema, so rewritting the table structure is not an option. Is there a way to update the Salary and StartDate in TableA without using a cursor?
Since the real example has about 12 fields that are updated, using single subqueries for each field would also be drag.
Any help is appreciated. Received on Wed Dec 11 2002 - 09:32:03 CST