How can I increment the count in a variable in the loop instead of codeing the actual numbers for the count such as (4,9,14,19,24). In other words, I just want to add 5 to the counter beginning with record number 4 in the loop. There can be up to 24 records in the loop.
This is an oracle table. I'm using PL/SQL.
See attached code.
v_count := 0
for c1 rec in c1 loop
v_count := v_count + 1;
if v_count in (4,9,14,19,24) then
if v_count in (5,10,15,20) then
if v_count in (6,11,16,21)