Sequence problem plus

Hi, I have some questions regarding sequences and more
In short,
I want to implement a table column that will be an autoincrement int.
This is used as a PK to another table that holds accounting records.
I use a cashed sequence to get autonumbers.
Also I want this column to show always the current value of the sequence (thus the last PK used on the records table), in order to be treated like an updatable column.
I will then implement an update trigger in the table holding the column in order for the sequence to be altered accordingly whenever an update occurs.
So this column is behaving like a pseudocolumn.
Can u please comment on this or give some insight on how this can be done?
Thanks in advance,
teo

If you have to reset the sequence to a specific value, then the easiest way is to drop and recreate the sequence. If you increment/decrement, then the only way is that posted by Gints, that is
ALTER SEQUENCE DSE INCREMENT BY a number
SELECT DSE.NEXTVAL from dual
ALTER SEQUENCE DSE INCREMENT BY 1
If not, the increment will work at next nextval. Example :
SCOTT@orcl SQL> create sequence s1 start with 100;
Sequence created.
SCOTT@orcl SQL> select s1.nextval from dual;
   NEXTVAL
       100
SCOTT@orcl SQL> alter sequence s1 increment by 10;
Sequence altered.
SCOTT@orcl SQL> select s1.nextval from dual;
   NEXTVAL
       110
SCOTT@orcl SQL> select s1.nextval from dual;
   NEXTVAL
       120
SCOTT@orcl SQL>                                                                                        

Similar Messages

  • Boot Sequence Problems

    I'm running into a bit of bad luck with my computer. Recently some data on both of my hard drives got corrupted, and ever since then I've had to use an old computer of mine. After salvaging some data off of one of my Hard Drives, I decided I would try and zero write my Hard Drive and then install a fresh Windows Vista onto it. Problem is, when I set the boot sequence in my BIOS to boot from the CD/DVD drive before the Hard drive, it skips over the cd/DVD drive and instead boots directly to the hard drive which still has the corrupted OS on it. My mobo is a K8N Diamond Plus, and I really have no idea what's wrong with it. It posts fine, and I can even get into the BIOS and modify the settings, but for some reason it won't listen to the boot sequence. I'm not sure if I should try to update the BIOS or not.
    Any help would be greatly appreciated.

    Problem is in your CD/DVD sources (damaged, or not bootable), or your DVD drive is going down.
    Leave only boot from CD/DVD, disable all other choices. Re-test, another note usually Windows bootable installation required to press any key after booting from them, if that wont happend until few seconds, then booting from CD/DVD disk will be skipped and boot process forwarded to your second configured boot device.(HDD in your case). If you pressed any key(at the exact moment when asked for that) and still no booting from Installation, there is possibility that actually you have pressed nothing. That can happend if you use USB keyb. and USB Legacy Support is turned off from BIOS.(In those condition the keyboard will no working where you need to press any key and booting from CD will be skipped)

  • Order Process Sequence Problem

    Currently I have a FM that does data from an incoming PO IDoc, makes some conversions, changes, etc.  It saves these changes into a new IDoc structure and then uses IDOC_INBOUND_ASYNCHRONOUS FM to post them to create orders.  The problem is if I have 5 IDocs (1, 2, 3, 4, 5) and I bring them in like normal, the results IDocs will sometimes come out out of sequence (5, 2, 3, 4, 1) or some other sequence.  Currently I have the partner profiles for the customer's setup so that it goes directly to my FM.  I'm trying to learn as much as I can about the process flow and how it all works.  If anyone can point me to some good documentation or knows of a better way to do this, please let me know.
    Thanks,
    Curtis

    Dear,
    Go to SNRO t-code.
    In this t-code enter AUFTRAG object.
    This object is for Order type.
    Here you will get option No. of Numbers in buffer check it. This is the field which is responsible for number range buffering
    Regards,
    R.Brahmankar

  • Oracle sequence problem in CMP Entity EJB

    I have a problem with Oracle sequence when I am using from the CMP entity EJB in WebLogic
    6.1:
    The problem is when the WebLogic server starts it acquires the correct sequence number
    from Oracle, but during the runtime, when I open a new sqlplus window and increment
    the sequence number, the container is not picking up from the new incremented value
    instead it is still continuining by incrementing the old sequence number it has acquired
    when it fetched from Oracle last time.
    The sequence increment and key-cache-size in weblogic-cmp-rdbms-jar.xml are exactly
    same
    Any help would be greatly appreciated.

    Change the key-cache-size to 1 in weblogic-cmp-rdbms-jar.xml and then try
    your experiment again.
    -- Anand
    "Satya" <[email protected]> wrote in message
    news:3d06274c$[email protected]..
    >
    I have a problem with Oracle sequence when I am using from the CMP entityEJB in WebLogic
    6.1:
    The problem is when the WebLogic server starts it acquires the correctsequence number
    from Oracle, but during the runtime, when I open a new sqlplus window andincrement
    the sequence number, the container is not picking up from the newincremented value
    instead it is still continuining by incrementing the old sequence numberit has acquired
    when it fetched from Oracle last time.
    The sequence increment and key-cache-size in weblogic-cmp-rdbms-jar.xmlare exactly
    same
    Any help would be greatly appreciated.

  • URGENT: Motion JPEG?? Sequence problems

    HI
    I have a sequence that instead of having DV PAL in the settings has Motion JPEG A - will this be ok to go into DVDSP for a DVD video project??. This sequence has a few issues with frame size which I've made posts about and trying to rectify.
    In the edited sequence I changed the Motion JPEG A to DV PAL, is this ok?? I'm about to try and test this out - but wanted to ask the forum for your urgent advice.
    The 1024 x 576 frame size is wrong also - I tried making a new sequence with the 720 x 576 settings and copying and pasting my AV into the new timeline. The template graphic was ok, but the video within it is all stretched!!!
    I'm starting to panic now.. as I need to send this off for sound then to the client tomorrow first thing...
    Hope you can help.
    Cheers, Margie

    Hi Karthik,
    I'm not trying to create an animation for a webpage.  I'm exporting the movie as a JPEG sequence for use in Final Cut Pro (as it's the cleanest way to recreate a flash animation in a movie file format).  Exporting as a GIF Animation however creates the same problems as when I export as a JPEG sequence... the timelines within timelines (movie clips) don't move at all (the movie clips are animations of various carbon molecules moving in a larger animation of a lot of other things going on).  Also, exporting as a GIF Sequence yeilds the same result... foreground elements move while background elements (movie clips) don't move.  Strangely, everything DOES move when it's exported as a SWF file... except I can't use a SWF file.  I've already tried exporting the file as a MOV file and it's too graphic-intensive and causes a lot of freezing in the animation when it renders as a MOV file, and when I try using various 3rd party SWF converters to convert the file to .MOV or .DV format, it also gets bogged down by the heavy graphics and freezes and skips.
    The only way that it works is when I export it as a JPEG sequence because the computer doesn't have to render it in real time, but for some reason, movie clips within the timeline won't play.  I'm hoping someone here knows a way around this, or a setting I can toggle to make it work.  Any info would be appreciated.  Thanks for trying though Karthik!
    Chris

  • Multiple destination tables, oracle sequence problems

    Hello,
    Please look at this sql - there is 2 steps to add data to 2 destination tables:
    - step1:
    INSERT INTO OBIEKTY (ID_OB, TELEFON, FAX, NR_LOKALU, UWAGI, ULICA, GEOM, NR_BUDYNKU, KOD_POCZTOWY, LISTA_OBIEKTOW, EMAIL, GMINA, NAZWA, WOJEWODZTWO, MIEJSCOWOSC, USUNIETY, POWIAT, JEDNOSTKA_WYJAZDOWA, MIEJSCOWOSC_POCZTY)
    VALUES (OB_SEQ.NEXTVAL, null, null, null, null, 'Legionowa', null, '8', '15-099', '0', null, null, 'WSSE w Białymstoku',null , 'Białystok', null, null, '0', null);
    -step2:
    INSERT INTO ZASOBY (ID_ZAS, UZYT_TWORZACY, UWAGI, UZYT_OST_MODYFIKACJI, DATA_OST_MODYFIKACJI, DYSPONOWALNY, DATA_UTWORZENIA, USUNIETY, ID_SPRZETU, ID_PAT, ID_MAT, ID_INST, ID_KATEGORII, ID_OBIEKT, ID_POZ_SL, ID_OSOBA, IMPORT)
    VALUES (ZAS_SEQ.NEXTVAL, 'import', null, null, null, '0', SYSDATE, '0', null, null, null, null, KTZ_SEQ.CURRVAL, OB_SEQ.CURRVAL, (select p.id_poz_sl from pozycje_slownikow p join slowniki s on p.id_slownika=s.id_sl where s.nazwa like 'TYPY_ZASOBOW' and p.kod = 'OB'), null, '1');
    There are problems with sequences. As you can see, there is OB_SEQ.NEXTVAL in first step and OB_SEQ.CURRVAL in second step. It's impossible to define multiple destination tables in one interface. But, if I do this in multiple interfaces, OB_SEQ.CURRVAL will be undefined in second interface.
    Also, all steps should be performed row by row. So: first step for first row, second step for first row, first step for second row, second step for second row etc. This don't happen if I use multiple interfaces - first step will be performed for all source records and then, second step will be performed for the same records - this is not what I want.
    Do you have any tips what is the best way in this case?

    Hello,
    Unfortunately, problem is not solved still. As you can see, there are 2 sequences, from 2 not joined tables: KTZ_SEQ.CURRVAL, OB_SEQ.CURRVAL. KTZ_SEQ.CURRVAL is declared here:
    insert into KATEGORIE_ZASOBU (ID_KTZ, UZYT_TWORZACY, UZYT_OST_MODYFIKACJI, LOKALIZACJA, DZIEDZICZENIE, DATA_OST_MODYFIKACJI, DATA_UTWORZENIA, DYSPONOWALNA, SYSTEMOWA, WYBIERALNA, OPIS, NAZWA, USUNIETA, ID_KATEGORII1, ID_POZ_SL, IMPORT)
    values (KTZ_SEQ.NEXTVAL, 'import', null, '0', '0', null, SYSDATE, '0', '0', '1', null, 'Jednostki WSSE', '0', null, (select p.id_poz_sl from pozycje_slownikow p join slowniki s on p.id_slownika=s.id_sl where s.nazwa like 'TYPY_ZASOBOW' and p.kod = 'OB'), '1');
    So, summary:
    - there are 2 steps (OB_SEQ.CURRVAL. KTZ_SEQ.CURRVAL) are set
    - third step: insert some hardcoded data + OB_SEQ.CURRVAL. KTZ_SEQ.CURRVAL values.
    Since KATEGORIE_ZASOBU and OBIEKTY are not joined, I can't add them as datasources in my interfaces (how to create join?) and set CURVAL?

  • MDT 2012 Suspend Task Sequence Problem

    Hi ,
    I have been using LTISuspens.wsf without problem in my MDT 2010 and MDT 2010 U1 for a long time. Recently I have create my test MDT 2012 and I have problem with this task.
    I have created the new Run Command line cscript.exe "%SCRIPTROOT%\LTISuspend.wsf" in State Restore section. The build and capture TS is stopping correctly and I have the LTISuspend icon on the desktop. After resuming the TS, it going correctly through, running
    sysprep, pop in again Set Network Location window, I can see it is running “Apply Windows PE (BCD)” step and then stops. There is message “suspended” and “The task sequence has been suspended true Use the…..”
    Any ideas what I am doing wrong?
    My customsettings.ini is from MDT 2010 and there they are fine.
    I am capturing Windows 7.
    Thanks
    Vinnie

    Hi,
    A few suggestions below for each of your issues.
    Issue 1 is that you don't see any task sequences in the wizard
     - Have you updated your deployment point after upgrading to 2012? if not then do this now
     - Have you updated your boot media with the newly generated Litetouch_x86.wim (meaning your boot CD, boot USB or WDS)
    The thinking behind this is that if you are using MDT 2010 boot media to try and speak to an MDT 2012 DS then you will have the same problem.
    Issue 2 is that you've had the TS running in the past but it's broken for one reason or another.
     - Have you recreated your Task sequence using the MDT 2012 client template? There are (minor but critical) differences in the logic between the versions of MDT and the new task sequence template has been updated as such. Using an MDT 2010 template with
    MDT 2012 scripts can cause this.
    These are 3 things that cause similar issues to you following an upgrade.

  • Batch Sequence Problem

    I am using Acrobat 9.4. I have a JavaScript that runs a batch sequence to create pop-up tool tips for certain words and phrases. The sequence works properly on most PDF files. I have a problem that on one basic PDF file the batch sequence properly creates the pop-ups but in the process converts the file to a PDF Form. The JavaScript author believes the problem must be that Acrobat adds Form Fields to the basic PDF file during the sequence operation and then thinks the file is a PDF Form. Is there any way to stop this from happening?

    Technically, a document with just a single button is a form. If you mean that the Forms document message bar appears, then that's a known problem. There is a user preference that controls whether the message bar is shown, but it's up to the user to set it.
    Without seeing the code, it seems apparent that it does add some type of form fields to the document to implement the tooltips and that is indeed the reason you're seeing the mesage bar.

  • Sequence  problem on iPod classic.

    Recently downloaded HP & the Deathly Hallows (audiobook) from JKR's Pottermore site, since still not available from iTunes store. Shows and plays in correct sequence in iTunes from my PC but transfer to my iPod classic is not.
    Please help.

    I haven't actually tested this, but surely the *Recently Added* is for songs recently added to the iPod. So if the songs were already on it, and you then placed them into a playlist, I wouldn't expect them to show up on the *Recently Added* list, because they were not recently added. (Maybe it's just me!)
    Back to the actual problem. Consider the playlist where only one song plays in shuffle mode: In iTunes, individually check each song from that list that does not play in shuffle mode; *File/Get Info/Options>Skip when shuffling.* Is the box checked - is there a tick in the box? If there is, that's the problem.
    A quick way of telling - play a song from the list *in shuffle mode:* what does the play 1 of X say? If it says 1 of 1, it's almost certainly going to be *Skip when shuffling* set on. But if it says 1 of <number of songs in list>, then the list should shuffle correctly.
    Phil

  • Sequence problem, please help

    Hi all,
    I am trying to build a primary key based on a sequence.
    1. i built the table
    2. i built the sequence
    3. i execute the following code
    CREATE OR REPLACE TRIGGER TBL1_ID_TRG
    BEFORE INSERT ON TBL1
    FOR EACH ROW
    BEGIN
    SELECT TBL1_M_ID_SEQ.nextval INTO :new.M_ID FROM DUAL;
    END
    when I execute this in TOAD I get a pop-up window titled Variables that defaults on :NEW(Integer) in the left pane (Variables) and Name :NEW, Type Integer and Value empty on the right pane. Regardless of what I type for the value it gives me the ORA-01036: illegal variable name/number Unable to find bind context on user side error.
    Can anyone explain what is the popup supposed to do?
    Thanks,
    kowalsky

    Thanks for the answer - I am very new to using TOAD; how would I use a PLSQL window? By the way, I tried to execute the same code in sql*Plus and I got the same error (rather it said the trigger was created with compilation errors).
    I am not sure what I am missing, all other autoincrements I can see in the schema are created with the exact same code ...
    Thanks,
    kowalsky

  • OC4J -Time out and Oracle sequence problem

    hi
    i m using OC4J to access application which is using java as front and
    and we using oracle sequence with cache as 20.
    so when i accessing application thro' network my sequence skip from 20
    mean 1-21-41-61 is it possible due to if lost connection opened from java for oracle thro' OC4J ? will it keep cache ?or lost ? is it really time out error?
    if then hw to set time out in oracle?
    u can refer below link
    Re: ORABPEL-05002

    i think i may be having the same problem. My table is savings entries out of order. I would assume that each row saved would be in sequence number order...instead it goes from like 963, 964, 678, 679, ....??? wonder why it would place new entries in front of older entries in the table???

  • HELP sequence problem!

    ive created a sequence and ran the query against it as below
    SQL> PROMPT Creating Sequence 'emp_seq'
    Creating Sequence 'emp_seq'
    SQL> CREATE SEQUENCE emp_seq
    2 MINVALUE 200
    3 MAXVALUE 9999999
    4 START WITH 201
    5 INCREMENT BY 1
    6 CACHE 20;
    Sequence created.
    SQL>
    SQL> insert into employee (emp_id, emp_name, emp_hiredate, ou_id)
    2 select emp_seq.nextval,emp_name, emp_hiredate, ou_id
    3 from employee;
    select emp_seq.nextval,emp_name, emp_hiredate, ou_id
    ERROR at line 2:
    ORA-04016: sequence EMP_SEQ no longer exists
    and this error occurs it all looks ok to me quite strange ive dropped and re created the sequence any ideas???

    its ok dropping the sequence and logging back into sql plus fixed it for some reason????????

  • Native sequencing problem

    Hi all,
    I'm using Oracle9i database together with TopLink 9.0.4
    and I can't get started native sequencing.
    I've created a sequence using following script:
    CREATE SEQUENCE "ITMS"."SEQUENCE" INCREMENT BY 1 START WITH 1
    MAXVALUE 1.0E28 MINVALUE 1 NOCYCLE
    CACHE 50 NOORDER
    I've set up the project and session to use native sequencing, plus I've run the following code once:
    Project project = XMLProjectReader.read("project.xml");
    DatabaseSession session = project.createDatabaseSession();
    SchemaManager schemaManager = new SchemaManager(session);
    schemaManager.createSequences();
    but it's still not working.
    Then I've tried default sequencing option, but it's the same.
    Only the third option using custom sequence table works.
    Did anybody make it work or am I doing anything wrong?
    Any help will be appreciated.
    Roman

    sorry, my mistake, it's ok now

  • Create sequence Problem

    I am creating these sequences but going no where, while in the 3rd sequence i get atleast error ORA-00955: name is already used by an existing object.
    What should be the solution? Is there any error code problem, need suggesitons, how to fix that?
    SQL> CREATE SEQUENCE SeqRecipeID INCREMENT BY 1 START
    2 WITH 1 MAXVALUE 1.0E28 MINVALUE 1 CYCLE
    3 NOCACHE ORDER
    4 /
    5
    SQL> CREATE SEQUENCE SeqModuleID INCREMENT BY 1 START
    2 WITH 1 MAXVALUE 1.0E28 MINVALUE 1 CYCLE
    3 NOCACHE ORDER
    4 /
    5
    SQL> CREATE SEQUENCE SeqEquipmentID INCREMENT BY 1 START
    2 WITH 1 MAXVALUE 1.0E28 MINVALUE 1 CYCLE
    3 NOCACHE ORDER
    4 /
    CREATE SEQUENCE SeqEquipmentID INCREMENT BY 1 START
    ERROR at line 1:
    ORA-00955: name is already used by an existing object

    why this sequence are not creating
    SQL> CREATE SEQUENCE SeqRecipeID INCREMENT BY 1 START
    2 WITH 1 MAXVALUE 1.0E28 MINVALUE 1 CYCLE
    3 NOCACHE ORDER
    4 /
    5
    SQL> CREATE SEQUENCE SeqModuleID INCREMENT BY 1 START
    2 WITH 1 MAXVALUE 1.0E28 MINVALUE 1 CYCLE
    3 NOCACHE ORDER
    4 /
    5
    while they dont exist , going no where...
    1 select * from user_objects
    2* where object_name = upper('SeqModuleID')
    SQL> /
    no rows selected

  • Import image sequence problem

    Hi. I have Compressor 5.3.5.
    I'm importing a TIF image sequence (1080p 25fps) to get an Apple Pro Res 422 HQ (using presets). I set the fps to 25 and start the conversion. Then I find the resulting Quicktime clip (Apple Pro Res 422 HQ) plays fast (like fast-forward). Also the clip has the expected time duration (length) but the last frame stays freezed till the clip ends, because the video is in fast-forward and freezes the last to fit the time duration. I tried the same with other presets (iPod h264, no presets at all, etc), but all give the same problem.
    Also I tried to get the video file from the TIF sequence using Final Cut Pro and everything looks fine except the color/contrast... that's why I need to use Compressor and not Final Cut.
    Can you help me please? I have googled this issue but found no related topics.
    Thanks.

    In fact, Compressor create an XML file in ~/Library/Application\ Support/Compressor/Scratch/
    In this XML, you've got sound, framerate and field dominance information if you set it in the inspector panel :
    <key>audioLocation</key>
              <string>path://to/audio/file.aif</string>
    <key>fieldOrder</key>
              <integer>2</integer>
    <key>frameRate</key>
              <real>25</real>
    But nothing if you don't set it. So Compressor believe that your image sequence is at 29.97 even if it's a 25 fps sequence...

Maybe you are looking for

  • Database not updating with changes from SQL*plus

    I’m having some issues with updating my database. I want to delete some rows in a table that has 323 records, so I run the SQL in SQL*Plus. It tells me that I’ve deleted 222 rows. I then get a count of the number of rows in the table, and it tells me

  • Stack the values in a series but not stack by series

    Anyone have the idea on this: stack the values in a series but not stack by series. There is only 1 series in the chart and I want to stack all the values returned. No way to do this in apex?

  • Fetching only part of an attribute which is a collection of the candidate

    Given is a pc A with an A.b collection 1:n relation to B. B contains a combination of other attributes. Is it possible to query for A and optain not all A.b but only a subset in A.b which fulfills some criteria (containing relations to a joined pc C)

  • BPS - Regenerate a BSP after transport

    Hi all, We are currently experiencing the problem that after transport from D to Q, our BSP's are not being regenerated automatically. So, although the correct configuration (in the WIB) is to be found in Q after transport, the ABAP workbench view of

  • Logo in lower right corner

    I am trying to place a corporate logo in the lower right-hand corner of the screen. I transfered the eps file into a psd format and imported it into FCP. However, I cannot figure out a way to manipulate the positioning from anything but centered in t