How to skip values in a cursor, not to populate in Data Block ? [message #642579] |
Tue, 15 September 2015 01:11 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](//www.gravatar.com/avatar/ef451c4c4042845d5e95985c1dc25362?s=64&d=mm&r=g) |
malya
Messages: 22 Registered: August 2015 Location: Hyderabad, India
|
Junior Member |
|
|
I am populating a cursor values into a data block. I Want to skip 2 rows of values from a cursor for a specific condition. I tried with Continue statement but it does not support it seems.
Problem :
----------
When Activity like 'TCP' for a unit in a specific hour, I want to skip it to pupulate it in data block and continue with the next values in cursor to populate in the data block.
Please help. Code snippet is given below.
GO_BLOCK('PRODRPT');
CLEAR_BLOCK(NO_VALIDATE);
FIRST_RECORD;
FOR CUR IN MAST LOOP
:UNITNAME := l_unit;
:PROJNAME := NVL(CUR.ACTIVITY,'');
:PRODCODE := NVL(CUR.TYPE,'');
:PRODRPT.shiftcode := l_shiftcode;
:hour := l_hour;
:figure := 0;
:SMS := l_smsflag;
-- Not supporting below stmt. Giving error as identifier continue must be declared.
/*
IF l_unit = <<unitcode>> AND l_hour <> '<<hour>>' AND NVL(CUR.ACTIVITY,'') IN
('TCP','CLO') THEN
CONTINUE;
END IF;
*/
NEXT_RECORD;
END LOOP;
|
|
|
|
|
|
|
|