Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to process next record in oracle PLSQL

User_SCMar 7 2013 — edited Mar 12 2013
Hi,

I am processing below record set with the help of BULK COLLECT in Oracle PLSQL Procedure. While processing I am checking model is one that need not be substituted. If it is 'NA' or 'N/A', I need process next record (marked as bold in code snipet)

Please guide me how to do it ?

TYPE t_get_money IS TABLE OF c_get_money%ROWTYPE INDEX BY BINARY_INTEGER;
L_money t_get_money ;

L_subst_model VARCHAR2(40);
L_Notify_Manager VARCHAR2(1);
L_grade VARCHAR2(20);
L_Error_Message VARCHAR2(1);

BEGIN
OPEN c_get_money ;
FETCH c_get_money BULK COLLECT INTO L_money ;
CLOSE c_get_money;

FOR I IN 1..L_money.count LOOP

-- check if the model is one that need not be substituted
IF (upper(L_money(i). subst_model) in ('N/A', 'NA')
THEN
L_NOTIFY_MANAGER(I) := 'Y';
L_GRADE(I) := 'ERROR';
L_error_message(i) := 'substitute Model is not N/A or NA' ;

-------Here I want to process NEXT RECORD--------
END IF ;
END;
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 9 2013
Added on Mar 7 2013
37 comments
9,489 views