dbTalk Databases Forums  

HELP

comp.database.oracle comp.database.oracle


Discuss HELP in the comp.database.oracle forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Web Tracer
 
Posts: n/a

Default HELP - 06-29-2004 , 03:00 PM






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 */ INTO
CopyRec;
--********** 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

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.