Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

SQL ERROR in DB2

$
0
0
Hope someone can help me out. How do I fix the set error



CREATE TRIGGER TESTDTA.WO_INSERT
AFTER INSERT ON TESTDTA.F4801
FOR EACH ROW MODE DB2ROW
BEGIN
INSERT INTO TESTDTA.F564801 A
SET (A.WHDOCO) = (SELECT B.WADOCO FROM TESTDTA.F4801 B WHERE B.WADOCO =
A.WHDOCO)
END


SQL State: 42601
Vendor Code: -199
Message: [SQL0199] Keyword SET not expected. Valid tokens: ROWS. Cause
. . . . . : The keyword SET was not expected here. A syntax error
was detected at keyword SET. The partial list of valid tokens is ROWS.
This list assumes that the statement is correct up to the unexpected
keyword. The error may be earlier in the statement but the syntax of
the statement seems to be valid up to this point. Recovery . . . :
Examine the SQL statement in the area of the specified keyword. A
colon or SQL delimiter may be missing. SQL requires reserved words to
be delimited when they are used as a name. Correct the SQL statement
and try the request again.

Viewing all articles
Browse latest Browse all 13329

Trending Articles