easy
create sequence v_seq;
declare
begin
for i in 1.100 loop
insert into table_x values (v_seq.nextval + 100);
insert into table_y values (v_seq.currval +100);
end loop;
-- drop and recreate sequence for use next time.
execute immediate('drop sequence_1');
execite immediate('create sequence sequence_1');
commit;
end;
is this what you meant?
Main Topics
Browse All Topics





by: frinpdPosted on 2004-10-21 at 13:34:35ID: 12374327
I have created below sequence
no ,labor_seq .nextval.. ..
CREATE SEQUENCE labor_seq
START WITH 100
INCREMENT BY 1
order
and i am trying to insert it in my procedure
insert into labor_allocate
(
header_id,line_number,seq_
)
(
select b.header_id,b.line_number,
)
gives me compile time error "PL/SQL: ORA-02287: sequence number not allowed here"