SQL>
SQL> set serveroutput on 500000
SP2-0158: unknown SET option "500000"
SQL>
SQL> DECLARE
2
3 start_period_number pls_integer := 1;
4 end_period_number pls_integer := 10;
5 current_period pls_integer := 5;
6
7 BEGIN
8
9 FOR calc_index IN start_period_number ..
10 LEAST (end_period_number, current_period)
11 LOOP
12 dbms_output.put_line(calc_index);
13 -- ... executable statements ...
14 END LOOP;
15
16
17 END;
18 /
1
2
3
4
5
PL/SQL procedure successfully completed.
SQL>
SQL>
SQL>
SQL>
|