Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7616397
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T02:52:37+00:00 2026-05-31T02:52:37+00:00

I need to forward a set of sequences with only DML access. Due to

  • 0

I need to forward a set of sequences with only DML access. Due to a bug in a piece of code several values were grabbed without a sequence but instead manually, so now the sequence is duplicating those values. So, I would like to push the sequence to the max value so that the next time nextval is called, it gives a value higher than the maximum. I’ve got about 50 sequences that each have to go a few thousand forward.

Is this possible with only DML access? If so, how should I go about it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T02:52:38+00:00Added an answer on May 31, 2026 at 2:52 am

    You can use dynamic SQL to do this. For example, this bit of code will select the next 10,000 values from each of a list of sequences.

    DECLARE
      l_num INTEGER;
    BEGIN
      FOR seq IN (select * 
                    from all_sequences
                    where sequence_name in (<<list of 50 sequences>>) 
                      and sequence_owner = <<owner of sequences>>)
      LOOP
        FOR i IN 1 .. 10000
        LOOP
          execute immediate 
             'select ' || seq.sequence_owner || '.' || seq.sequence_name || '.nextval from dual'
             into l_num;
        END LOOP;
      END LOOP;
    END;
    

    If you had the ability to issue DDL against the sequence, you could use a similar approach to set the INCREMENT to 10,000, select one value from the sequence, and set the INCREMENT back down to 1 (or whatever it is now).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to forward a set of symbols from one DLL to another (to
Struts 1.3 application. Main website is NOT served by struts/Java. I need to forward
I have an action which I need to post forward onto another action if
Need to an expression that returns only things with an I followed by either
Pretty straight forward question, I have a GtkEntry widget that I want to set
I need a php script that you can use to set up a online
I need to set up a proxy with authentication to verify the behavior of
I have some JavaScript that creates Forward and Back buttons. However, I need to
I need to disable redirection after login check, because I need to get only
How can i set bounds so my image which moves using acclerometer can only

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.