Kirti,

I have to set the maxvalue manually, when I do this still nextval not reset.
For example if the maxvalue is 1000000 and the current value is 500, some
how I have to set alter sequence to reach the maxvalue so the next value
start from 0 again.
This test doesn't do that.


-----Original Message-----
Sent: Friday, January 31, 2003 12:08 PM
To: Multiple recipients of list ORACLE-L


Please post your test... 

- Kirti

-----Original Message-----
Sent: Friday, January 31, 2003 1:43 PM
To: Multiple recipients of list ORACLE-L


Kirti,

I test it it doesn't work.


-----Original Message-----
Sent: Friday, January 31, 2003 11:09 AM
To: [EMAIL PROTECTED]
Cc: Hamid Alavi


Hamid,

Here is one way:

SQL> select myseq.currval from dual;

   CURRVAL
----------
         4

SQL> alter sequence myseq nocache;

Sequence altered.

SQL> alter sequence myseq maxvalue 4 cycle;

Sequence altered.

SQL> select myseq.nextval from dual;

   NEXTVAL
----------
         1

SQL> REM ---> Other alter sequence commands to change maxvalue, cache,
nocycle etc. 
               
Now, you get to do the tricky part of automating it ;) Because, I have not
attempted to do it, yet. 

HTH,

- Kirti


-----Original Message-----
Sent: Friday, January 31, 2003 12:21 PM
To: Multiple recipients of list ORACLE-L


Dear List,

How can I reinitiate a sequence Instead or dropping & recreating it, I want
every night my sequence number reinitiate and start from 1 again.
Thanks for your help.


Hamid Alavi

Office          :  818-737-0526
Cell phone  :  818-416-5095






======================= Confidentiality Statement ======================= 
The information contained in this message and any attachments is 
intended only for the use of the individual or entity to which it is 
addressed, and may contain information that is PRIVILEGED, CONFIDENTIAL 
and exempt from disclosure under applicable law.  If you have received 
this message in error, you are prohibited from copying, distributing, or 
using the information.  Please contact the sender immediately by return 
e-mail and delete the original message from your system. 
===================== End Confidentiality Statement =====================  


-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Hamid Alavi
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).







======================= Confidentiality Statement ======================= 
The information contained in this message and any attachments is 
intended only for the use of the individual or entity to which it is 
addressed, and may contain information that is PRIVILEGED, CONFIDENTIAL 
and exempt from disclosure under applicable law.  If you have received 
this message in error, you are prohibited from copying, distributing, or 
using the information.  Please contact the sender immediately by return 
e-mail and delete the original message from your system. 
===================== End Confidentiality Statement =====================  


-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Hamid Alavi
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Deshpande, Kirti
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).





======================= Confidentiality Statement ======================= 
The information contained in this message and any attachments is 
intended only for the use of the individual or entity to which it is 
addressed, and may contain information that is PRIVILEGED, CONFIDENTIAL 
and exempt from disclosure under applicable law.  If you have received 
this message in error, you are prohibited from copying, distributing, or 
using the information.  Please contact the sender immediately by return 
e-mail and delete the original message from your system. 
===================== End Confidentiality Statement =====================  


-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Hamid Alavi
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to