Results 1 to 6 of 6

Thread: Triggers

  1. #1
    Join Date
    Feb 2005
    Location
    Barcelona
    Posts
    42

    Unanswered: Triggers



    Next trigger is not valid:

    CREATE TRIGGER capuntes_upd_2
    AFTER UPDATE OF cuenta, codaux, apteid, moneda ON capuntes
    REFERENCING NEW AS nxt OLD AS prv
    FOR EACH ROW MODE DB2SQL
    WHEN (prv.cuenta != nxt.cuenta)
    BEGIN ATOMIC

    CALL capuntes_cimpcont(prv.apteid, nxt.cuenta);

    END

    SQLSTATE: 42601, SQLERRMC: END-OF-STATEMENT;.apteid, nxt.cuenta);<delim_semicolon>

    Which is the problem?


  2. #2
    Join Date
    Jul 2004
    Posts
    76
    I don't think you can call stored procedure from trigger!!!

  3. #3
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    If you are on LUW V8, you can issue a SP call from a trigger ...
    IIRC, call SPs from triggers are valid from V7 on ZOS

    What platform are you on ?
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  4. #4
    Join Date
    Mar 2004
    Posts
    448
    Sathyaram,

    Is this not version 8.2.

    regards

    Mujeeb

  5. #5
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    Mujeeb, thanks for pointing out ...
    DB2 LUW supports call of SP from trigger from V8.2

    Cheers
    Sathyaram
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  6. #6
    Join Date
    Feb 2005
    Location
    Barcelona
    Posts
    42


    Thanks.

    I have confirmed that a trigger can not call a stored procedure in the book titled DB2 Universal DataBase in Application Development Environments.

    So it is possible from DB2 LUW 8.2. What about AS/400 platform?


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •