DECLARE
CURSOR c1
IS
SELECT full_name
FROM
per_all_people_f
WHERE business_group_id = 10665;
TYPE
employees_tab IS TABLE OF c1%ROWTYPE
INDEX BY PLS_INTEGER;
l_employees employees_tab;
limit_in NUMBER := 1000;
BEGIN
OPEN
c1;
LOOP
FETCH c1
BULK
COLLECT INTO l_employees
LIMIT limit_in;
FOR
i IN 1 .. l_employees.COUNT
LOOP
DBMS_OUTPUT.put_line
(l_employees (i).full_name);
END
LOOP;
DBMS_OUTPUT.put_line
('Break in Loop - Limit
Set to 1000 Records');
EXIT
WHEN l_employees.COUNT < limit_in;
END
LOOP;
CLOSE c1;
END;
No comments:
Post a Comment