Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Increment at counter
How about the following, though it is slow.
Changes below:
Allan Martin (allan.martin_at_saic.com) wrote:
: DECLARE
: v_counter NUMBER := 0;
cursor test_cursor is
select distinct v1, v2, v3 from the table;
: BEGIN
for each_rec in test_cursor loop
: insert into tbl1 values
: (each_rec.v1,
: each_rec.v2,
: each_rec.v3);
v_counter := v_counter+1
end loop;
: commit;
: dbms_output.put_line('1. || v_counter || ' records inserted.');
: END;
: /
Received on Wed Oct 24 2001 - 11:21:31 CDT
![]() |
![]() |