Forum Stats

  • 3,782,441 Users
  • 2,254,645 Discussions
  • 7,880,078 Comments

Discussions

Trigger Creation Error

641078
641078 Member Posts: 20
edited Oct 2, 2008 10:04AM in SQL & PL/SQL
Hi all,

I am using SQL NAVIGATOR to create a trigger. The code the wizard generates however will not compile (invalid identifier on line 1). I cant seem to fix it. Anyone?

CREATE OR REPLACE TRIGGER CWISE175.UPDATE_POSTCODE_TRIGGER
AFTER INSERT OR UPDATE
OF ADDRESS1
,ADDRESS2
,ADDRESS3
,ADDRESS4
,ADDRESS5
,ADDRESS6
,ADDRESS7
ON CWISE175.TOCPOSTALADDRESS
REFERENCING NEW AS New OLD AS Old
FOR EACH ROW
CALL cwise175.update_postcode (:new.c,:new.i,:new.address1,:new.address2,:new.address3,:new.address4,:new.address5,:new.address6,:new.address7) ;

thanks in advance
superkav
Tagged:

Best Answer

Answers

  • BluShadow
    BluShadow Member, Moderator Posts: 41,623 Red Diamond
    does this work?...
    CREATE OR REPLACE TRIGGER CWISE175.UPDATE_POSTCODE_TRIGGER 
    AFTER INSERT OR UPDATE 
    OF ADDRESS1 
    ,ADDRESS2 
    ,ADDRESS3 
    ,ADDRESS4 
    ,ADDRESS5 
    ,ADDRESS6 
    ,ADDRESS7 
    ON CWISE175.TOCPOSTALADDRESS 
    REFERENCING NEW AS New OLD AS Old 
    FOR EACH ROW 
    CALL cwise175.update_postcode (new.c,new.i,new.address1,new.address2,new.address3,new.address4,new.address5,new.address6,new.address7) ; 
  • Satyaki_De
    Satyaki_De Member Posts: 7,081
    Why SQL Navigator????? And, Why Wizard?????

    SQL Navigator also has text editor where you can write SQL or PL/SQL stuff and execute it. Anyway, i looked your code and also simulated that in SQL Navigator.

    Perhaps you have manually entered the following lines - which ultimately causing error.
    CALL cwise175.update_postcode (:new.c,:new.i,:new.address1,:new.address2,:new.address3,:new.address4,:new.address5,:new.address6,:new.address7) ;
    Check this line.

    Regards.

    Satyaki De.
  • 662793
    662793 Member Posts: 9
    Hi,

    Have u tried in putting PL/SQL blocks like DECLARE,BEGIN,EXCEPTION and END.

    If not just put and try in SQL Navigator.

    It will work
  • 641078
    641078 Member Posts: 20
    yes i manually added the call to this stored procedure.
  • 662793
    662793 Member Posts: 9
    Accepted Answer
    Hi,

    Have u tried in putting PL/SQL blocks like DECLARE,BEGIN,EXCEPTION and END.

    If not just put and try in SQL Navigator.

    It will work
  • 641078
    641078 Member Posts: 20
    yes i manually added the call to this stored procedure.
This discussion has been closed.