Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> CREATE TRIGGER history?????????
Hello,
I have two identical tables.
Primary and History table.
I insert data in Primary table and need insert the same data in History
table
PS. I need history table to keep 'Clear' not updated data.
I created index but got ERROR
SQL> CREATE OR REPLACE TRIGGER History
AFTER INSERT ON Merchant_Partnert
FOR EACH ROW
BEGIN
INSERT INTO Merchant_Partnert_Hist
SELECT * FROM Merchant_Partnert where row_id= row_id_seq.CURRVAL ;
commit;
END History;
/
Trigger created.
When I run transactions I receive ERROR.
ERROR at line 1:
ORA-03113: end-of-file on communication channel
CREATE TABLE Merchant_Partner(
row_id INTEGER NOT NULL, network_id INTEGER, merchant_id INTEGER, merchant_partner_id INTEGER, active CHAR(1) default 't' check (active in ('t', 'f')), creator VARCHAR2(50), creation_date DATE,CONSTRAINT ROW_ID_PK PRIMARY KEY (row_id), CONSTRAINT NETWORK_ID1_FK FOREIGN KEY (network_id) REFERENCES Merchant_Nwk(network_id),
CREATE TABLE Merchant_Partner_Hist(
row_id INTEGER NOT NULL, network_id INTEGER, merchant_id INTEGER, merchant_partner_id INTEGER, active CHAR(1) default 't' check (active in ('t', 'f')), creator VARCHAR2(50), creation_date DATE,
Any Ideas how to insert data in history table?
Thank you,
Arthur
Received on Tue Apr 25 2000 - 00:00:00 CDT