Re: data update in a cursor

From: Peter-Paul van de Beek <P.P.v.d.Beek_at_a2000.com>
Date: Wed, 18 Nov 1998 10:02:34 +0100
Message-ID: <36528D2A.DEC75EF6_at_a2000.com>


With the statement
Select for update
You will only lock the records ( there's no real update )

You could for example use something like:  FOR someone in C_ACCNT_NR LOOP

     IF CA00.CHECK_ACCOUNT(someone.cost_code , l_pr_group)
     THEN
          v_flag := 'Y';
          dbms_output.put_line(someone.cost_code||' is valid');
      ELSE
          v_flag := 'N';
           dbms_output.put_line(someone.cost_code||' is not valid');
     END IF;
[Quoted]      update fn_temp
     set       valid_flag = v_flag
     where  current of C_ACCNT_NR

    END LOOP; you should declare v_flag.

P.P. van de Beek Received on Wed Nov 18 1998 - 10:02:34 CET

Original text of this message