Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> DBMS_ERRLOG will not compile within a cursor loop

DBMS_ERRLOG will not compile within a cursor loop

From: <alexglaros_at_gmail.com>
Date: Thu, 01 Nov 2007 04:47:43 -0000
Message-ID: <1193892463.783527.122360@v29g2000prd.googlegroups.com>


DBMS_ERRLOG will not compile within a cursor loop. Depending upon where I put the
semicolons, I get these types of error messages.

PLS-00103: Encountered the symbol "ERRORS" when expecting one of the following: := . ( @ % ;
or

(S6019) Expecting: ; RETURN RETURNING

Any ideas on how I re-write to code below to work?

I can make it work with a regular non-looping insert statement from sqlPlus or PL/SQL

Thanks!

Alex Glaros

  FOR c1_rec IN c1_accu_actions LOOP

        INSERT INTO ACCUSATION_ACTIONS
                 ( id,
       acn_id,

    case_type,
    ate_code,
    ate_pgm_code,
    action_date,
    description,
    css_copy_id_create,
    reference )
    VALUES ( c1_rec.seq,
             c1_rec.id,
    c1_rec.case_type,
    c1_rec.action_code,
    c1_rec.agency,
    c1_rec.action_date,
    c1_rec.action_desc,

    c1_rec.p_copy_id,
    c1_rec.reference )
                   LOG ERRORS INTO ACCUS_ACTIONS_ERR_LOG REJECT LIMIT
100;
  v_recount := v_recount + 1;
  IF (v_recount > 100) THEN
     v_recount := 0;
     COMMIT;
  END IF;
      END LOOP;

  COMMIT; Received on Wed Oct 31 2007 - 23:47:43 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US