Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2003
    Posts
    6

    Unanswered: calling stored procedure from trigger

    Hi, is it possible to call a stored procedure from a trigger pn db2 v8.1?

    ie:
    CREATE TRIGGER tri_herman1
    AFTER INSERT ON HERMAN1
    REFERENCING NEW AS n
    FOR EACH ROW MODE DB2SQL
    CALL trans_pcd('table','s','a',current timestamp,null,123,'1');
    @

    i get this error:
    DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command. During SQL processing it returned:
    SQL0104N An unexpected token "CALL trans_pcd" was found following "MODE DB2SQL ". Expected tokens may include: "<values>". LINE NUMBER=5.
    SQLSTATE=42601

    If so, how to you do it then?

    Thanks!

    Herman Badenhorst

  2. #2
    Join Date
    Jan 2002
    Location
    USA
    Posts
    53
    No, You can't. at least version <=V7.2.

Posting Permissions

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