Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Set sequence value to an another starting value.???

inDiscoverJun 22 2014 — edited Jun 24 2014

Hi All,

I have a scenario as mentioned below.

In my web application I need to generate check numbers for some selected checks. Here I am using a sequence object to generate those check numbers. Assigning check numbers is in such a way that user can enter a starting number,say 1, then check number till 1000 will get generated if he want 1000 checks to be generated. Next time suppose user got a new check booklet and it's starting number is 5000 (instead of 1001) for example then sequence should start increment from 5000 to generate check number from 5000.

So basically I should be able to increment sequence value from a user specified starting point, say it may be from 1 or 5000 or 20000 like that. Is this possible to do, by using a sequence object???. If possible is there any drawback?, I know one drawback that is concurrent access may cause issue in count. But in my case concurrent access will not happen.

Please help me achieve this.

Your timely help is well appreciated.

Thanks in advance.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 22 2014
Added on Jun 22 2014
9 comments
5,082 views