How do I alter a sequence in a procedure

I need to alter sequences in a procedure. I have done this before on an Oracle 8 database using:
EXECUTE IMMEDIATE ('ALTER SEQUENCE OFFICIAL_ID_SEQ INCREMENT BY ' ||( v_official_id_high - v_official_id_current));
How do I do this on an Oracle 7 database?
Thanks,
Alison.

You will have to use dbms_sql to do that
I need to alter sequences in a procedure. I have done this before on an Oracle 8 database using:
EXECUTE IMMEDIATE ('ALTER SEQUENCE OFFICIAL_ID_SEQ INCREMENT BY ' ||( v_official_id_high - v_official_id_current));
How do I do this on an Oracle 7 database?
Thanks,
Alison.

Similar Messages

  • SAP HANA - How to run alter table statement in HANA procedure?

    I am trying to run alter table statement in a procedure. HANA gives error saying
    SAP DBTech JDBC: [257] (at 1338): sql syntax error: ALTER TABLE is not allowed in SQLScript: line 36 col 8 (at pos 1338)
    How to run alter table statements in procedure?
    Thanks,
    Suren.

    Hi Rich Heilman,
    Thanks for your response.  I have tried with dynamic SQL. I am trying to add partitions to a non portioned table.
    EXECUTE IMMEDIATE 'ALTER TABLE ' || :SCHEMA_NAME || '.TARGET_TABLE PARTITION BY RANGE (TARGET_TYPE_ID) (PARTITION VALUE = 1, PARTITION VALUE = 2, PARTITION VALUE = 3, PARTITION VALUE = 4, PARTITION OTHERS)';
    Execution fails with error
    Could not execute 'CALL PARTITION_TARGET_TABLE('SUREN_TEST')' in 1.160 seconds .
    [129]: transaction rolled back by an internal error:  [129] "SUREN_TEST"."PARTITION_TARGET_TABLE": line 53 col 3 (at pos 2173): [129] (range 3)
    Any reasons for this error?
    Thanks,
    Suren.

  • How can I alter the track sequence of an album? It used to be possible through Get Info on old iTunes, but it doesn't seem to be an option in the new version.

    How can I alter the track sequence of an album? It used to be possible through Get Info on old iTunes, but it doesn't seem to be an option in the new version.

    Right click - get info.

  • How to create the Access sequence for the Vendor+material+plant combination

    Hi all
    Please let me know How to create the Access sequence for the Vendormaterialplant combination..
    Whats the use? What its effect in purhcase and taxe..
    brief me please

    Hi,
    you are asked to maintain the access sequence for the tax condition for which you are putting 7.5%.
    goto OBQ1 or img..financial accounting new...global settings.... taxes on sales and purchases ......basic settings.....
    find the tax condition type. see in it which access sequence is attached.
    if there is none then use JTAX used for taxes in India.
    or you can create the similar one for your.
    to create the same goto OBQ2.
    new entry or copy JTAX.
    and assign the access sequence to condition type.
    this will resolve your problem if you just need to assign the access sequence.
    regards,
    Adwait Bachuwar

  • How can I change the sequence of songs in my iTunes library and playlists?

    I find that I cannot alter the sequence of songs iniTunes library, nor in 'My Playlist'.
    Having dragged an item to place between two others, it goes back to where it was.
    I am probably asking 'Help' the wrong question, but I cannot find the right answer.
    I am sure the answer is very simple, but I would welcome the right answer.

    That's the normal intended behaviour of the Library. I'm not exactly sure why it is, but I guess it's to make it clear to users that if they want to "fine tune" the tracks they should use a playlist (just like you can't use the burn button in the library).
    I'm sure you've noticed that you can still sort the library by clicking the headings.

  • How can I debug a sequence that has a subsequence is running in a separate thread?

    Hi,
    How can I debug a sequence that has a subsequence is running in a separate thread?
    I have to have a continues check for a  digital in signal to be able to terminate the sequence if a physical button is pushed.
    This is running in a separate thread, but this way I cannot debug the main sequence.
    Is there any workaround for this?
    Thanks,
    Andras

    This KB might help you:
    http://digital.ni.com/public.nsf/websearch/46D1E157756C37E686256CED0075E156?OpenDocument
    Let me know if this does not help.
    Allen P.
    NI

  • How to find out which sequence a certain column used?

    you konw column C in table T is created by a sequence.
    How to find out which sequence column C is using?

    In the meantime I think it ought to becompulsory to
    only assign sequence values in triggers.
    Why? I can see no good reason for this. I think it's a good idea to have stuff like this
    coded in only one placeI don't like your argument for compulsory using triggers for sequences for exactly the same reason as you, ie that I like to keep my code in one place. If I'm reading some pl/sql code which uses a sequence I like to see the fact that the sequence is used in the pl/sql code, rather than to check to see if theres a trigger on the table and then see which sequence that uses.
    "naming conventions can work, provided they're enforced. Alas, like other standards, they can only be enforced by active policing".
    Thats what code reviews are.
    " there is also the special case of one sequence populating more than one table...."
    This is My Pet hate. I don't think there's ever a case where this is absolutely necessary. Again code reviews
    Unfortunately I have to live with a system which does this.
    and I appreciate we can't all have code reviews, etc.

  • URGENT: How to run threads in sequence?

    Dear experts, I am new to writing threads. I would like to know how to run threads in sequence? How do I know when a thread finishes its task?
    In the following code, classes Process_A(), Process_B(), Process_C() and Process_D() are subclasses of Class Thread.
    I'd like to know if I am using the join() function correctly? My intention is to wait for the previous process to finish before running the current process.
    Could anyone kindly give me some solutions on how to run the processes in sequence?
    Thanks!!
    =============================================================
    Thread process;
    Vector process_names = new Vector();
    process_names.add("a");
    process_names.add("b");
    process_names.add("c");
    for(int i=0; i<process_names.size(); i++)
    String process_name = (String) process_names.elementAt(i);
    if(process_name.equals("a"))
    process = new Process_A();
    else if(process_name.equals("b"))
    process = new Process_B();
    else if(process_name.equals("c"))
    process = new Process_C();
    else if(process_name.equals("d"))
    process = new Process_D();
    timer = new javax.swing.Timer(1000, new ProcessListener());
    timer.start();
    // ProcessListener()
    class ProcessListener implements ActionListener {
    public void actionPerformed(ActionEvent evt) {
    if(process!=null)
    if(process.isAlive())
    try
    process.join();
    catch(Exception ex)
    ex.printStackTrace();
    process.start();

    just look at this simple example u will get to know how to use join method
    This does exactly what u want
    class callme
    void call(String msg)
    System.out.println("["+msg);
    Try
    Thread.sleep(1000);
    catch(InterruptedException e)
    System.out.println("interrupted");
    System.out.println("]");
    class caller implements Runnable
    String msg;
    Callme target;
    Thread t;
    Public Caller(Callme targ, String s)
    target=targ;
    msg=s;
    t=new Thread(this);
    t.start();
    public void run()
    target.call9msg);
    class Synch
    public static void main(String arg[])
    Callme target=new Callme();
    Caller ob1=new Caller(target,"hello");
    Caller ob2=new Caller(target,"Synchronized");
    Caller ob3=new Caller(target,"world");
    Try
    ob1.t.join();
    ob2.t.join();
    ob3.t.join();
    catch(InterruptedException e)
    System.out.println("interrupted");
    waiting for dukes

  • How do I change the sequence of fields in DT?

    Hello,
    How do I change the sequence of the  fileds DT in such a way that the MM (already done) will not be disturbed?
    Thanks
    Nikhil.

    I could figure it out
    you can actually do it by right clicking on the field , cut and insert
    thanks anyways,

  • How do i alter my screen size  on mozilla firefox?

    how do i alter the screen size on mozilla fire fox

    Normally you would just drag one of the edges of the browser window.  How does this question relate to downloading, installing, setting up Adobe software?

  • How to handle user exit sequence

    how do handle the userexit sequence i,e in which order the user exits are stored?

    one  and state solution
    go to debugger mode make  breakponint on statement call fm.
    and press f8 continiously and check exit fm one by one.

  • HT204382 How do you read AVI sequences with Quick Time Player ?

    How do you read AVI sequences with Quick Time Player ? H2OT

    Hope somebody will help, I downloaded Flip4MacWMV 2.4.4.2dmg as recommended but it did not work. can I get HELP? Thanks

  • How I can include several sequences in one sequence file?

    I am new for teststand and forgive me if my question seems silly.
    How I can include several sequences in one sequence file? I would like to use " call sequence" in current file.
    thanks a lot for your kind help

    Hey gunking,
    If you'd like to find out more information about our training courses, I'd be happy to speak with you further about what the course contains and locations offered, but it's probably best if we take this off of the forums for further conversation via phone or email.
    Create a new support request at www.ni.com/contact and set the product as TestStand.  You will be directed to myself or another engineer on my team, at which point you can ask for me or just speak with one of my teammates.
    Off the top of my head, I do know that there are a few courses coming up in Austin in the next couple of weeks (I'm teaching one myself), if you're interested in those.  Otherwise, courses are always being added for the future.
    Derrick S.
    Product Manager
    NI DIAdem
    National Instruments

  • How we cn avoid the sequence in remote tables through global temporary tabl

    Hi,
    We have table xx_interface_qualifiers in the remote db and we are inserting the data like this and its on a loop
    INSERT INTO xx_interface_qua
    (interface_id,
    list_line_interface_id, excluder_flag,
    qualifier_context, qualifier_attribute,
    qualifier_attr_value, qualifier_precedence,
    comparison_operator_code, start_date_active,
    end_date_active, list_header_name, list_line_no,
    creation_date, created_by, last_update_date,
    last_updated_by, interface_attribute1
    VALUES (xx_interface_qua_s.NEXTVAL,
    ttt, 'Y',
    xxx, xxx2,
    xxx3, xxx4,
    '=', SYSDATE,
    NULL, xxx4, -1,
    SYSDATE, '-1', SYSDATE,
    '-1', 44 );
    We are trying to avoid the hitting of the database every time for a sequence and try to implement the global temporary tables,i mean to say 1st we need to insert the data to TEMP table and then from temp table we cn inseert all the data to xx_interface_qual in a single shot to improve the performance.
    But how we cn avoid the sequence in this case as we do not know the sequence in remote side.
    Please suggest any other way to improve the performance.
    Regards
    Das

    797846 wrote:
    We have table xx_interface_qualifiers in the remote db and we are inserting the data like this and its on a loop
    We are trying to avoid the hitting of the database every time for a sequence and try to implement the global temporary tables,i mean to say 1st we need to insert the data to TEMP table and then from temp table we cn inseert all the data to xx_interface_qual in a single shot to improve the performance.
    But how we cn avoid the sequence in this case as we do not know the sequence in remote side.Does not make sense. I/O is the slowest database operation.
    You have an unknown performance problem (that you claim is due to a sequence, but failed to provide any evidence for). Now you want to create more I/O, by writing the data twice. Once into a temp table and then again into the destination table. And do that in order to increase performance?
    I do not see how this can solve the underlying, and unknown, performance issue that you claim exists.
    Any problem solution needs to start with correctly and comprehensively identifying the problem.
    You cannot solve a problem without first knowing WHAT the problem is.

  • How can i change the sequence of text element in standard driver program ?

    Hi,
    can u tell me how can i change the sequence of text element in standard  sapscript driver program.. without making a zcopy of standard driver program.
    My problem is when MEDRUCK form is getting printed for PO print , header text is coming before item. But the requirement is to come it after item.So how cani do that without making the zcopy of  SAPLMEDRUCK program..Is there any enhancement point in SAPLMEDRUCK driver program..where i can put my customise code for changing the sequence of text element ?

    Hi,
        Just copy the MEDRUCK to ZMEDRUCK. No need to copy the driver program.
    1) SE71Menu > Utilities > COpy from Client
    MEDRUCK ->>Client 000
    New formname ZMEDRUCK
    2) Now open the ZMEDRUCK in DE language in SE71
    3) Menu > Utilities > Convert original Language
    Change DE  to EN, save and activate
    4) Now open the ZMEDRUCK in EN language
    5) Goto Pagewindows > Main window,
    Look for the HEADER text Text element, copy the whole code under this Text element just after the ITEM text Text element, and comment the HEADER text above.
    Now the Header text Text element will be below ITEM text only. This will full fill your requirment.
    Now goto NACE transaction and add the copied ZMEDRUCK to the EF application.
    Regards
    Bala Krishna

Maybe you are looking for

  • Dropdown menu in APEX 4.0

    Hi, I am wondering how to create the Dropdown menu in APEX 4.0. Similar to the Oracle Application Express Homepage or the one gets created in any Websheet Application. I have tried to use the List but unable to place into the right position (Display

  • A trappable error (E0434F4D) occurred in an external object

    When launching crystal reports from ASP application following error displayed in the Internet Explorer screen . "A trappable error (E0434F4D) occurred in an external object. The script cannot continue running" Our System Configuration : Report launch

  • How do I change the decimal separator from a comma to a dot in numbers? I upload my bank statements into numbers and all contain dots. Numbers does not understand the dots.

    Hi, I am a recent convert from Exell to Numbers. I have downloaded my bank statements to Numbers. The bank statement uses dots as decimal separators, whilst the Numbers default is a comma. I need to change the Numbers format to dot to avoid having to

  • PC Suite with Vista

    I recenly downloaded PC Suite. I have Windows Vista. Following the download I received a message to update, which I started the process. The download took forever, finally got a message, could not complete. When I stopped it, all data was completely

  • Why is my DVD video so bad?

    I rendered an h.264 of original footage (from dslr) out of premiere cs5 and transcoded to Mpeg2. I dropped the mpeg2 into encore and burned it. When watching it on the tv the footage is shakey - like gate weave -  and blurry. Why? What is the correct