Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Update multiple rows

Update multiple rows

From: Don <dkolva_at_atlab.com>
Date: 11 Dec 2002 07:32:03 -0800
Message-ID: <7f205d5c.0212110732.7bbd6d76@posting.google.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US