Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: how to update a sequence?
There's probably another (better) way, but you can do it like this (DIARY_NDIARY is the sequence for the DIARY table):
CREATE OR REPLACE
PROCEDURE UPDATE_DIARY_SEQUENCE IS
iCtr INTEGER;
MaxDiaryId INTEGER;
iDummy INTEGER;
CURSOR INIT_DIARY IS
SELECT DIARY_NDIARY.NEXTVAL FROM DUAL;
BEGIN
BEGIN
UPDATE_DIARY_SEQUENCE;
END;
/
DROP PROCEDURE UPDATE_DIARY_SEQUENCE;
HTH
Christopher Latta
Norbert Lemke <ofenroor_at_gmx.de> wrote in message
news:9ha682$cgdcd$1_at_ID-76747.news.dfncis.de...
> Hi,
>
> I have an oracle sequence, it generates unique keys (everything all right
so
> far). With my Visual-Basic-GUI I can create single records 'insert into
tab
> (id) values(seq.nextval)', and everything works fine.
>
> But now I want to insert some bulk data, 10,000 records at once. I want to
> do this wiht the SAS-software, which has an own data format and own method
> for appending records.
Received on Tue Jun 26 2001 - 10:59:53 CDT