Warning: Procedure created with compilation errors [message #234087] |
Sun, 29 April 2007 15:23  |
oracle1234ab
Messages: 2 Registered: April 2007
|
Junior Member |
|
|
Hi All
I am new to store procedures
I have created a procedure to add a new dept in the dept table
I am getting the following message. Can someone help me or make me understand why this problem is coming
I code is
CREATE OR REPLACE PROCEDURE ADDNEWDEPT(
D_NO DEPTNO%TYPE,
D_NAME DNAME%TYPE,
D_LOC LOC%TYPE)
AS
BEGIN
INSERT INTO DEPT(DEPTNO,DNAME,LOC)
VALUES(D_NO,D_NAME,D_LOC);
END ADDNEWDEPT;
Thanks
Oracle1234ab
|
|
|
|
|
Re: Warning: Procedure created with compilation errors [message #234170 is a reply to message #234087] |
Mon, 30 April 2007 05:04   |
Dipali Vithalani
Messages: 278 Registered: March 2007 Location: India
|
Senior Member |
|
|
Hi,
the other thing might be, the variables used in query are having no values when they are used in insert query. Do you have any constraints like primary key, or not null on the fields used in the insert query? In such situations also error might be generated because they will be violated. So take care of them too..
Regards.
|
|
|
|
|
Re: Warning: Procedure created with compilation errors [message #234270 is a reply to message #234177] |
Mon, 30 April 2007 11:59  |
oracle1234ab
Messages: 2 Registered: April 2007
|
Junior Member |
|
|
All
CREATE OR REPLACE PROCEDURE ADDNEWDEPT(
D_NO dept.DEPTNO%TYPE,
D_NAME dept.DNAME%TYPE,
D_LOC dept.LOC%TYPE)
AS
BEGIN
INSERT INTO DEPT(DEPTNO,DNAME,LOC)
VALUES(D_NO,D_NAME,D_LOC);
END ADDNEWDEPT;
Now it is worrking fine , I just added dept table name infront of the column name
Thanks
Oracle1234ab
|
|
|