theresatan
Programmer
Hi,
I have following error when I create a package body, but it did not say any hind:
Warning: Package Body created with compilation errors.
Any idea?
Following is my script(run on oracle 92)
CREATE TABLE PARTS
(ID NUMBER(38)
,DESCRIPTION VARCHAR2(250) NOT NULL
,UNITPRICE NUMBER NOT NULL
,ONHAND NUMBER(38) NOT NULL
,REORDER VARCHAR2(40) NOT NULL
);
INSERT INTO parts
VALUES (1,'Fax Machine',299,277,50);
COMMIT;
CREATE OR REPLACE PACKAGE PARTMGMT IS
PROCEDURE UPDATEPART (PARTRECORD IN PARTS%ROWTYPE);
PROCEDURE DELETEPART (PARTID IN INTEGER);
END PARTMGMT;
/
CREATE OR REPLACE PACKAGE BODY PARTMGMT AS
ROWSPROCESSED INTEGER := 0;
PROCEDURE UPDATEPART (PARTRECORD IN PARTS%ROWTYPE) IS
BEGIN
UPDATE PARTS
SET RECORDER = PARTRECORD.RECORDER
WHERE ID = PARTRECORD.ID;
ROWSPROCESSED := ROWSPROCESSED + 1;
END UPDATEPART;
PROCEDURE DELETEPART (PARTID IN INTEGER) IS
BEGIN
DELETE FROM PARTS WHERE ID = PARTID;
ROWSPROCESSED := ROWSPROCESSED + 1;
END DELETEPART;
END PARTMGMT;
/
Thanks!
Theresa
I have following error when I create a package body, but it did not say any hind:
Warning: Package Body created with compilation errors.
Any idea?
Following is my script(run on oracle 92)
CREATE TABLE PARTS
(ID NUMBER(38)
,DESCRIPTION VARCHAR2(250) NOT NULL
,UNITPRICE NUMBER NOT NULL
,ONHAND NUMBER(38) NOT NULL
,REORDER VARCHAR2(40) NOT NULL
);
INSERT INTO parts
VALUES (1,'Fax Machine',299,277,50);
COMMIT;
CREATE OR REPLACE PACKAGE PARTMGMT IS
PROCEDURE UPDATEPART (PARTRECORD IN PARTS%ROWTYPE);
PROCEDURE DELETEPART (PARTID IN INTEGER);
END PARTMGMT;
/
CREATE OR REPLACE PACKAGE BODY PARTMGMT AS
ROWSPROCESSED INTEGER := 0;
PROCEDURE UPDATEPART (PARTRECORD IN PARTS%ROWTYPE) IS
BEGIN
UPDATE PARTS
SET RECORDER = PARTRECORD.RECORDER
WHERE ID = PARTRECORD.ID;
ROWSPROCESSED := ROWSPROCESSED + 1;
END UPDATEPART;
PROCEDURE DELETEPART (PARTID IN INTEGER) IS
BEGIN
DELETE FROM PARTS WHERE ID = PARTID;
ROWSPROCESSED := ROWSPROCESSED + 1;
END DELETEPART;
END PARTMGMT;
/
Thanks!
Theresa