« on: April 13, 2009, 09:57:19 pm »
I have 2 db tables
emp(empID, empname, deptID)
I have the following view that is created successfully
Create view E_VIEW as
Select empName, deptName
From emp, dept
Where emp.deptID = dept.deptID;
I have the following store procedure created successfully that calls and inserts into the above view, the empname and deptName.
CREATE or REPLACE procedure INSERT_TO_VIEW(
p_ename in varchar2,
p_dname in varchar)
INSERT into E_VIEW values(p_ename, p_dname);
However my calling routine with the following code generates the below mentioned error
ORA-1779 error cannot modify a column which maps to a non key
One thing I want to mention is that the empID in the emp table is a non null field and is generated by a sequence next val (EmpSeq.nextval).
Do I need to take care of this or is the error due to something else??