If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Triggers

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-03-05, 12:04
dvtdbd dvtdbd is offline
Registered User
 
Join Date: Feb 2005
Location: Barcelona
Posts: 42
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?

Reply With Quote
  #2 (permalink)  
Old 03-03-05, 12:36
jsp2999 jsp2999 is offline
Registered User
 
Join Date: Jul 2004
Posts: 76
I don't think you can call stored procedure from trigger!!!
Reply With Quote
  #3 (permalink)  
Old 03-03-05, 14:01
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
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.
Reply With Quote
  #4 (permalink)  
Old 03-03-05, 18:24
bmujeeb bmujeeb is offline
Registered User
 
Join Date: Mar 2004
Posts: 448
Sathyaram,

Is this not version 8.2.

regards

Mujeeb
Reply With Quote
  #5 (permalink)  
Old 03-04-05, 02:39
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
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.
Reply With Quote
  #6 (permalink)  
Old 03-04-05, 06:43
dvtdbd dvtdbd is offline
Registered User
 
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?

Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On