By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,213 Members | 2,172 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,213 IT Pros & Developers. It's quick & easy.

SQLCODE -104 in CREATE TRIGGER

P: n/a
DB2 V 7, Z/OS:

I receive an SQLCODE -104 for the following trigger :

CREATE TRIGGER TRSERED1
NO CASCADE BEFORE
INSERT
ON SEMINAR
REFERENCING
NEW AS ZUGANG
FOR EACH ROW
MODE DB2SQL
WHEN
( ZUGANG.REFNR IS NOT NULL )
BEGIN ATOMIC
SET ZUGANG.RNNAME_RED=
( SELECT RNNAME
FROM REFERENT
WHERE REFNR=ZUGANG.REFNR );
END

The corresponding error - message is:

DSNT408I SQLCODE = -20100, ERROR: AN ERROR OCCURRED WHEN BINDING A TRIGGERED
SQL STATEMENT. INFORMATION RETURNED: SECTION NUMBER : 2 SQLCODE -104,
SQLSTATE 42601, AND MESSAGE TOKENS RNNAME,+ ) -
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

What is wrong with the statement? I tried everything. Can anyone help me?

I would be very gladful for help!!!!!

Thanx
Peter
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
I don't think that DB2 V7 z/OS supports scalar fullselects.
Try SELECT INTO.

Cheers
Serge

--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab

Nov 12 '05 #2

P: n/a
Serge Rielau <sr*****@ca.eye-bee-m.com> wrote in message news:<bs**********@hanover.torolab.ibm.com>...
I don't think that DB2 V7 z/OS supports scalar fullselects.
Try SELECT INTO.

Cheers
Serge


Thanks a lot for your prompt answer. I will try this.
Bye Peter
Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.