Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> HELP
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);
ReqID := :new.Request_ID; SELECT * FROM REQ1 /*WHERE REQ1.Request_id = ReqID */ INTOCopyRec;
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 - 15:00:23 CDT
![]() |
![]() |