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 > Trigger Declare

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-02-04, 08:48
haburai haburai is offline
Registered User
 
Join Date: Dec 2003
Posts: 10
Trigger Declare

I know that some sql procedure statement I can used in trigger, but I got error, when I try this:

CREATE TRIGGER NEW_TRIG_TEST
AFTER INSERT ON FH04T18
FOR EACH ROW MODE DB2SQL
DECLARE l_proces varchar(50) DEFAULT 'TRIGGER';
DECLARE l_param varchar(50) DEFAULT 'USE';

.....


is it possible to used DECLARE statement in trigger?
Reply With Quote
  #2 (permalink)  
Old 06-02-04, 09:00
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
Did you get the message from DB2 ?
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #3 (permalink)  
Old 06-02-04, 09:01
Anderson Anderson is offline
Registered User
 
Join Date: Jan 2004
Posts: 30
You must use declare variables within BEGIN ATOMIC ... END in triggers
Reply With Quote
  #4 (permalink)  
Old 06-02-04, 09:28
haburai haburai is offline
Registered User
 
Join Date: Dec 2003
Posts: 10
Other Question

Thank you for zor help now it is OK.
I have another problem with DECLARE EXIT HANDLER.
Is it possible to do this in trigger?
Reply With Quote
  #5 (permalink)  
Old 06-02-04, 09:45
Anderson Anderson is offline
Registered User
 
Join Date: Jan 2004
Posts: 30
I think u cannot use condition handlers within triggers.
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