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 > Problem creating Trigger in DB2 OS390 v7.1

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-30-03, 16:46
byron byron is offline
Registered User
 
Join Date: Oct 2003
Location: Hartford CT
Posts: 1
Problem creating Trigger in DB2 OS390 v7.1

I've attempted to create a trigger:

--#SET TERMINATOR #
CREATE TRIGGER NOBACKDT
NO CASCADE BEFORE UPDATE ON NZMF.EVENTT
REFERENCING NEW AS A
FOR EACH ROW MODE DB2SQL
BEGIN ATOMIC
SET A.LAST_UPD_TMSTMP =
CURRENT TIMESTAMP;
SET A.CMPL_DT =
(SELECT B.CMPL_DT
FROM NZMF.CMPL_DT_CNSTRNT B
WHERE DATE(B.TMSTMP) <> '0001-01-01');
END
#
--#SET TERMINATOR ;

When I run the create using SPUFI, I get the following error:

DSNT408I SQLCODE = -20100, ERROR: AN ERROR OCCURRED WHEN BINDING A TRIGGERED
SQL STATEMENT. INFORMATION RETURNED: SECTION NUMBER : 3 SQLCODE -104,
SQLSTATE 42601, AND MESSAGE TOKENS B,+ ) -

DSNT418I SQLSTATE = 56059 SQLSTATE RETURN CODE

DSNT415I SQLERRP = DSNHPARS SQL PROCEDURE DETECTING ERROR

DSNT416I SQLERRD = 0 0 0 -1 0 0 SQL DIAGNOSTIC INFORMATION

DSNT416I SQLERRD = X'00000000' X'00000000' X'00000000' X'FFFFFFFF'

X'00000000' X'00000000' SQL DIAGNOSTIC INFORMATION


Can anyone out there help explain what it is I'm doing wrong, or if what I'm trying to do can be done at all.... I'm under the gun to get this trigger created as it is impacting a very big design decision on whether or not we can be sure that financial transactions cannot be back-dated.

Thank you in advance for your assistance and expertise...
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