471,073 Members | 1,133 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,073 software developers and data experts.

SQL0206N during create trigger...

Hey Gurus..I am trying to figures out where my syntax is incorrect in the following SQL to to create an after insert trigger... I am getting
SQL0206N "INSERTROW.MF_USERID" is not valid in the context where it is used. LINE NUMBER=1. SQLSTATE=42703

CREATE TRIGGER "O000634"."test_insert"
AFTER
INSERT
ON "O000634"."TMAX300_USER"
REFERENCING
NEW AS "insertrow"
FOR EACH ROW
MODE DB2SQL
BEGIN ATOMIC
insert into O000634.TMAX300_USER_HISTORY ("MF_USERID", "SEC_MF_IND", "NET_ID", "FIRST_NAME", "MIDDLE_NAME",
"LAST_NAME", "PHONE", "PHONE_EXT", "FAX", "EMAIL", "AGENCY", "BUREAU",
"OMBBRN", "ROOM", "ADDRESS_1", "ADDRESS_2", "CITY", "STATE", "ZIPCODE",
"USER_STATUS", "ADMIN_USER", "COMMENT", "SDATE", "STIME", "SUSER", "CDATE",
"CTIME", "CUSER", "APPUSER", "ACTION")
VALUES
(insertrow.MF_USERID, insertrow.SEC_MF_IND, insertrow.NET_ID, insertrow.FIRST_NAME, insertrow.MIDDLE_NAME,
insertrow.LAST_NAME, insertrow.PHONE, insertrow.PHONE_EXT, insertrow.FAX, insertrow.EMAIL, insertrow.AGENCY, insertrow.BUREAU,
insertrow.OMBBRN, insertrow.ROOM, insertrow.ADDRESS_1, insertrow.ADDRESS_2, insertrow.CITY, insertrow.STATE, insertrow.ZIPCODE,
insertrow.USER_STATUS, insertrow.ADMIN_USER, insertrow.COMMENT, insertrow.SDATE, insertrow.STIME, insertrow.SUSER, insertrow.CDATE,
insertrow.CTIME, insertrow.CUSER, insertrow.APPUSER, 'INSERT');
END;
May 9 '07 #1
2 2476
Herb
13
try taking the Quotes off of insertrow.
May 9 '07 #2
OK whew!!..that worked...I swear to god Quest put those quotes there...Thanks Herb!
May 9 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Barbara Lindsey | last post: by
3 posts views Thread by Prince Kumar | last post: by
4 posts views Thread by jefftyzzer | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.