HELP
Date: 29 Jun 2004 13:00:23 -0700
Message-ID: <342bbdf8.0406291200.197c169e_at_posting.google.com>
Can anyone tell me why this Trigger won't compile correctly?
CREATE OR REPLACE TRIGGER REQ1_NEWREQ_TRIGGER_GCSIFOMTO
AFTER INSERT
ON REQ1
REFERENCING NEW AS NEW OLD AS OLD
FOR EACH ROW
WHEN (
CREATED_USERID.REQ1 != 'REQUESTAPI' --If the RequestAPI is creating
this, don't fire off a new row to the intermediate table
AND REQUEST_ID.REQ1 LIKE 'REQ%' --If the request comes from anywhere
else but the outside source, don't fire
)
DECLARE
--********** Variable Declaration **********
CopyRec some_schema.GCSIFOMTO%ROWTYPE; ReqID VARCHAR2(20);
********** Trigger Firing Solution ********** BEGIN
ReqID := :new.Request_ID; SELECT * FROM REQ1 /*WHERE REQ1.Request_id = ReqID */ INTOCopyRec;
--********** End Trigger Body **********
END;
--********** End Trigger **********
When I put it into the dB I get the following error off of it and I am
not sure why:
ORA-04076: invalid NEW or OLD specification
Very annoying. I can't find an documentation that says I can't do this, but I obviously can't.
This is running against 9i, and I am a former MS SQL Server programmer trying to develop against an Oracle dB and I am not HAVING ANY FUN!
Thanks,
Web Received on Tue Jun 29 2004 - 22:00:23 CEST