Home » RDBMS Server » Networking and Gateways » Compilation Error
Compilation Error [message #367778] Tue, 11 April 2000 00:23
sajid
Messages: 18
Registered: April 2000
Junior Member
I have a trigger on a table. When I compile, it gives me an error message 'Trigger created with compilation errors'. There is no syntax/logical error in the trigger. Can you guide me? Trigger is as follows:

In Oracle 7.3 I have the following tables, and a trigger.

ITEM table:
Name Null? Type
------------------------------- -------- ----
ITEM_ID NOT NULL VARCHAR2(4) PK
ITEM_NAME NOT NULL VARCHAR2(30)
RATE NOT NULL NUMBER(6,2)
OPENING_BAL NOT NULL NUMBER(7,2)
CURRENT_BAL NUMBER(7,2)

ORDER_DETAIL table:
Name Null? Type
------------------------------- -------- ----
ORDER_NO NOT NULL NUMBER(4) PK
ITEM_ID NOT NULL VARCHAR2(4) PK and, FK to ITEM table.
QTY NOT NULL NUMBER(6,2)
RATE NOT NULL NUMBER(6,2)
COMMENTS VARCHAR2(200)

Create or replace trigger order_detail_aft_udi_row
after update or delete or insert on order_detail
for each row
begin
If inserting then
Update item set current_bal = current_bal + :new.qty
where item_id = :new.item_id;
Else if updating then
Update item set current_bal = current_bal - :old.qty + :new.qty
where item_id = :new.item_id;
Else if deleting
Update item set current_bal = current_bal - :old.qty
where item_id = :old.item_id;
End if;
End;
/

when I give the command "SHOW ERRORS" oracle says "NO ERRORS".

Therefore, I request you to kindly solve my problem.

Thank you, Sir.
Previous Topic: delays when connecting to oracle
Next Topic: Oracle8 ODBC driver with Windows98 2nd Edition
Goto Forum:
  


Current Time: Tue Apr 16 01:23:12 CDT 2024