Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2011
    Posts
    30

    Unanswered: while updating the nickname.

    AIX6.4 DB2 9.5

    while updating the nickname ,i am getting following error.
    Looking at the error code,i am confused on whether i can execute the update nickname statment in the for loop or not?

    or does it failed due to other reason?

    please help



    ERROR [25000] [IBM][DB2/AIX64] SQL30090N Operation invalid for application execution environment. Reason code = "22". LINE NUMBER=27. SQLSTATE=25000
    below is the query.

    BEGIN ATOMIC
    FOR v_row AS

    SELECT ACTN
    FROM U90JDAP.table1 WHERE PRCSD IS NOT NULL
    DO

    UPDATE U90JDAP.NICKNAME_AIM SET ts = CURRENT TIMESTAMP
    WHERE ACTN = v_row.ACTN
    END FOR;

    END

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Why all of that? This should do the trick:

    Code:
    UPDATE U90JDAP.NICKNAME_AIM 
    SET ts = CURRENT TIMESTAMP 
    WHERE ACTN in (SELECT ACTN FROM U90JDAP.table1 WHERE PRCSD IS NOT NULL)
    Andy

Posting Permissions

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