Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2012
    Posts
    1

    Unanswered: SQL ERROR in DB2

    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.

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Check The Book of Manual for the correct INSERT statement syntax.
    ---
    "It does not work" is not a valid problem statement.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •