posted 19 years ago
Hi! I am trying to create following trigger but getting error..
CREATE OR REPLACE TRIGGER CMPGN_ID_TEST
BEFORE INSERT OR UPDATE
ON SH_TRIGGER_TEST
REFERENCING NEW AS NEW OLD AS OLD
FOR EACH ROW
DECLARE
tmpVar NUMBER;
BEGIN
tmpVar := 0;
SELECT ENS_CAMPAIGN_SEQ.NEXTVAL INTO tmpVar FROM dual;
:NEW.CAMPAIGNID := to_char(tmpVar);
-- call store procedure .NewEmailPromo() to insert rows
-- in campaign hierarchy table(Catalog,Segment_Code,Keycode)
-- IF (errCode <> 0)
-- get the errMsg to the user in the GUI(somehow)
call NewEmailPromo(:NEW.CAMPAIGNID,:NEW.CATALOG_CD,:NEW.SEGMENT_CD,:NEW.CAMPAIGN_NAME,:NEW.MESSAGE_NAME,:NEW.LIST_NAME);
EXCEPTION
WHEN OTHERS THEN
-- Consider logging the error and then re-raise
RAISE;
END ;
___/
____________________________________________
error I am getting is
PLS-00103: Encountered the symbol "NEWEMAILPROMO" when expecting one of the following:
:= . ( @ % ;
any idea what's going wrong?
thanks
SA