Sequence with several increments

In our database we have a sequence that is used by different applications 2.

The application queries A * 1000 * ID, it will use.
Requests for application B * 100 * ID.

A possible solution might be the following:

The sequence is created with increment * 1 *.
The applicant seeks the nextval.
The application removes the sequence.
The app recreates the sequence with the value he got + 100/1000.

The problem here is that these applications consist of multiple threads. When thread 1 is the sequence and 2 request the nextval thread, the application will fail.

Another solution might be the following:

The sequence is created with increment * 1 *.
The applicant seeks the nextval.
The application increments the sequence with 100/1000.

Here, I am a little worried about the thread 2 asking the nextval after Threading 1 asked the nextval but before Threading 1 incremented sequence.
Maybe if run as 1 transaction, this problem does not occur?

I would really like to know your opinion on this.

Tags: Database

Similar Questions

  • I'm trying to generate an arithmetic and geometric series/sequence with JavaScript.

    I try to generate an average arithmetic and geometric
    series/sequence with JavaScript. The thing that makes this challenge is that
    I use user input to determine the parts of the formula that I use for
    generate each sequence. I tried running the formulas, but I learned that I was
    channels running through them and not numbers. How to generate my
    sequences/series and always use user input? PS, here's my formulas: (a1-East
    first term, d and r are difference/ratio, and n is the n-th term)

    1.) a1 + d * n  

    2.)a1 * r^n

    Entry user of a form is always a string. There are several ways to convert a string to a number in JavaScript:

    • Pass it as an argument to Number()
    • Pass it as an argument to parseInt() (for an integer)
    • Pass it as an argument to parseFloat() (for a floating-point number)
  • AE even project with several compositions / need them changed first

    I have on Ae project with several busy list. Each animation list is its own model but its seems I cannot use the project to the Prime Minister.

    I think this because I can't search and find each model extract sequences in my first.

    I need them to be editable so off heartbreaking will not work.

    Is there a work around for this or a way of standard to do this?

    You comps in first not importing projects. I can't say what you're missing here. Just go to Premiere Pro and select Import the new After Effects Composition. Link to a project and then choose a composition. Then repeat for the other compositions that you want to import, and then drop them into a sequence.

  • Create the Select sequence with the request number

    Hi all

    I would like to create a sequence number in oracle, but instead of coding hard 'start with' I want to choose the max value of the primary key of a table and add 1 and use it instead:

    So what I want is:
    CREATE SEQUENCE crg_mrec_seq
    MINVALUE 1
    MAXVALUE 999999999999999999999999999
    START WITH select max(primarykey)+1 from table1
    INCREMENT BY 1
    CACHE 20;
    I guess I have to spend this max value as a variable in the create sequence number, but I'm not sure of the syntax to use.

    Thank you
    Ed

    Hello

    The START WITH value must be a literal NUMBER. You need dynamic SQL statements to do what you asked.
    EXECUTE IMMEDIATE, as mentioned above, is a way to make the dynamic SQL statements.
    In SQL * Plus, the substitution variables are another.

    COLUMN     first_num_col     NEW_VALUE first_num
    
    SELECT  MAX (primarykey) + 1        AS first_num_col
    FROM      table1;
    
    CREATE SEQUENCE crg_mrec_seq
    MINVALUE 1
    MAXVALUE 999999999999999999999999999
    START WITH  &first_num
    INCREMENT BY 1
    CACHE 20;
    
  • ORA-19279 with several children in XML

    Hi all

    I get this error:

    ORA-19279: XQuery dynamic type mismatch: expected - singleton sequence got several sequence element

    When you try to select an XML type.

    The XML looks like:
    <users>
      <user>
        <username>123456</username>
        <details>
          <password>password</password>
          <forename>Barry</forename>
          <surname>Donovan</surname>
          <retired>0</retired>
          <email>email.com</email><phone>9999-88880333</phone>
        </details>
        <assignedRoles>
          <EXAM_CODE>9999_4949</EXAM_CODE>
          <EXAM_CODE>8888_3838</EXAM_CODE>
        </assignedRoles>
      </user>
    </users>
    My SQL to query it is:
    SELECT
           h.pin
          ,d.password
          ,d.forename
          ,d.surname
          ,d.email
          ,d.phone
          ,d2.exam_code
          FROM
             robin_temp x,
             xmltable('users/user' passing
                xml COLUMNS
                    pin       varchar2(1000) path 'username'
                  , lineitem  xmltype        path 'details'
                  , lineitem2 xmltype        path 'assignedRoles') h,
             XMLTable('details' PASSING
                h.lineitem COLUMNS
                   password varchar2(1000) path 'password'
                  ,forename varchar2(1000) path 'forename'
                  ,surname  varchar2(1000) path 'surname'
                  ,email    varchar2(1000) path 'email'
                  ,phone    varchar2(1000) path 'phone') d,
             xmltable('assignedRoles' passing
                  h.lineitem2 columns
                  exam_code varchar2(1000) path 'EXAM_CODE' d2                   
    Basically, because there is the child < details > and the < assignedRoles > child, I get this error. But I don't know what we can do about it...

    I'm still trying to sort this issue, but so far no joy at all... I can't imagine that it's a rare thing, then someone can help?

    Thank you so much in advance.

    Robin

    And multiple details, something like that...

    SQL> ed
    Wrote file afiedt.buf
    
      1  with t as (select xmltype('
      2    
      3      123456
      4      
    5 password 6 Barry 7 Donovan 8 0 9 email.com9999-88880333 10
    11 12 9999_4949 13 8888_3838 14 15
    16
    ') as xml from dual) 17 -- 18 -- end of test data 19 -- 20 select x.username 21 ,y.password 22 ,y.forename 23 ,y.surname 24 ,y.retired 25 ,y.email 26 ,z.exam_code 27 from t 28 ,xmltable('/users/user' 29 passing t.xml 30 columns username varchar2(20) path './username' 31 ,details xmltype path './details' 32 ,assignedroles xmltype path './assignedRoles' 33 ) x 34 ,xmltable('/details' 35 passing x.details 36 columns password varchar2(20) path './password' 37 ,forename varchar2(20) path './forename' 38 ,surname varchar2(20) path './surname' 39 ,retired number path './retired' 40 ,email varchar2(50) path './email' 41 ) y 42 ,xmltable('/assignedRoles/EXAM_CODE' 43 passing x.assignedroles 44 columns exam_code varchar2(20) path '.' 45* ) z SQL> / USERNAME PASSWORD FORENAME SURNAME RETIRED EMAIL EXAM_CODE -------------------- -------------------- -------------------- -------------------- ---------- -------------------------------------------------- -------------------- 123456 password Barry Donovan 0 email.com 9999_4949 123456 password Barry Donovan 0 email.com 8888_3838 SQL>
  • Shortcut for the new window with several tabs

    Is it possible to have a shortcut on the desktop to launch a new window with several tabs? For example - home page is set to "www.google.com", but the shortcut opens new window with tabs "www.cnn.com" and "www.youtube.com".

    Then far,.../firefox.exe-nouveau-fenetre followed by the two URL in quotes will open two new windows. Entry - new-window "www.cnn.com" - new-tab 'www.youtube.com' will open two new windows if no instance of firefox is open, but if another window is already open, youtube will add a tab to the already open window, rather than the new window with cnn.com

    In reply to myself... withdrawal-order new window (and-new-tab), now it works.

    Looks like I'm too complicated it.

    shortened final was "C:\Program Files (x 86) \Mozilla ' 'url1'"url2.

  • Functions defined by the user with several parameters

    I set features three following user using "Define."

    UF1 takes a single patameter;

    UF2 takes two parameters;

    and UFX takes two parameters - with the second is 'X' in the definition.

    Œuvres F1.  F2 is the EVAL of F1 version and it works too.  User functions only seem to work fine.

    F3, a function of two user settings, produces a graph of NaN.

    F4 is the EVAL of F3 version.  Note that 'B 'is not replaced by 1'.  Also produces a NaN chart.

    F5 produces a graph of NaN.

    F6 is EVAL of F5.  The 'X' is not replaced (even with the ' B' above), and even if it looks like 'X * X', it also produces a graph of NaN.

    Is it possible to get defined by the user, with several parameters, features work by tracing the curve?

    Hi!, Fortin:

    If you download and install the ultimate Firmware with the version of the software: 2015 6 17 (8151), with the number of Version: 1.1.2 - 11, you can trace your examples of definition of the function, with curves and values, without NaN.

  • Background with several pictures

    How can I create a wallpaper for my iPad, iPhone, MacBook Air with multiple photos?

    (El Capitan, iOS 9.2.1 Photos)

    To create a collage of photos, you can create a photo book project and select a template page with several photos. Fill it with photos of your choice and print the page in PDF format.

    The themes of the book are different according to the terms of the photos and the number of photos per page.

    It's the theme travel plans:

    If you have installed iWork apps try Keynote to create a slide with many photos, arranged freely.

  • WiFi HP ENVY 4500 with several Access Points - same SSIS Configuration

    Hello

    We just got a HP ENVY 4500.  I have a main homenetwork with a wifi Modem/Router and an old router acting as an Access Point to the floor to extend coverage.

    Both have the same SSID and password and are set to different channels.

    My HP ENVY 4500 fails to connect when the Access Point is lit.

    It will connect with it.

    Once connected, I can turn on the PA and all is well.

    The two router an AP using WPA-PSK/WPA2-PSK encriptación

    The router (that it connects to) should have a better sgnal when both are on, so I do not understand why they need the AP to be turned off to connect.

    Any thoughts people?

    Eserim

    I think he has always had problems with several access points.  Try this, what ever AP is closest to the printer, set it to channel 1.  Then try channel 11.  Try now.

  • Carpet * a DVD-Ram UJ - 841S comes with several error messages

    My laptop is relatively new, I've been burning some video files in DVD - RW and all of a sudden my DVD drive has stopped working. It came with several error messages format "failed due to damage media", "format failed due to general failure" and "the inserted disc is READ only".

    I also can't rip music discs.

    Can you see ODD listed in Device Manager, and if so what is the exact status it?

    Sorry, but we discus on ODD, but nobody knows what model of laptop you have and what is the history of this problem. Is replaced the drive? Why are you sure that you are using compatible with your laptop ODD.

    Please more information!

  • Interfacing with several unknown USB devices; all producing NMEA strings

    Hi all

    Question about the peripheral USB interface and their associated drivers.

    I have the obligation to build an application that interacts with the USB devices that produce NMEA strings. I have the library to parse NMEA strings, but I fight with interfacing with several unknown USB devices. When deploying applications, I know not all possible USB devices to use.

    Is it possible to produce one driver who will accept any USB device strings?

    Or, more likely, is there a way to get the LV to recognize a connected USB device and automatically find / install the driver like windows does and is it possible to do in a deployed application?

    I had a trawl of the forums, but I've not found anything that specific.

    Thanks, I really appreciate the help.

    About the VI "set up the serial port", my problem is that the choice of COM port is in a separate menu (not directly related to the VI) and it allows all possible COM ports to be selected. That can be addressed.

    I am not expecting an all-in-one solution but asked the question in case it was possible.

    What I realized, is that for my specific condition to read strings from a USB device. It is likely to be sent over a serial connection. LV can handle this well and easily assuming the device has the installed driver / settings are available.

    LV (and indeed any other program) will not work without a device driver / settings. In this case, parameters set must be found (error) / a USB RAW driver would need to be developed. Devices requirng a RAW USB driver would need a serious review to continue due to the time and effort required. All this effort is work inherited from the AIDS to navigation

    I appreciate any help and I think I got the answer I was looking for! Thank you very much

  • Closure of a state machine in queue event with several parallel loops

    I am trying to find the best way to stop a program that consists of an architecture of State machine in line waiting for event with several parallel loops. Can anyone recommend the best way to achieve this in my attached VI? (To browse the forum, this seems to be a frequently asked question, but I have not found a solution that works for me.)

    I look forward to any comments on my as well code, if someone is willing to offer it.

    My program needs:

    If the user press the 'Stop' button, the program should prompt the user with "are you sure you want to stop the program?" and then return to a State of rest or move forward to stop the program. In addition if there is an error, the program should prompt the user to ' clear the error and continue, or stop the program. Then back to the idle state or move forward to stop the program.

    Architectural details:

    The program consists of 3 parallel loops: (1) a loop of event management that places different States of a queue of the State, (2) a State Machine that enters the State that is removed from the queue of the State and (3) a loop error/Shutdown, which deals with errors in the error queue management.

    During normal shutdown, where running handling loop in the case of event 'Program.Shutdown' and 'Shutdown' and the 'Idle' States are added to the queue of the State. In the state machine, the State of 'Stop' is invoked. Special "5000" error code is added to the queue of the error. In the loop of error handling and stopping, "5000" error triggered a prompt that asks the user if they want to stop the program. If the user chooses not to stop, a notifier StopNotif is sent to the State of 'Stop' and 'Program.Shutdown' event case with notification 'Go '. If the user decides to stop, the Notifier sends the notification "Stop". Loop and event management State Machine ends when they receive the notification "Stop".

    In case of error, the program behaves in the same way: If the user chooses to clear the error and continue, the program returns to the status "pending".

    HOWEVER - if the user chooses to stop the program, the program crashes. The author of the notification that is sent to stop the loop of events and State Machine management cannot be read because event Program.Shutdown and the stop State (which contain the function "Waiting to notify") are not active.

    I was able to activate the stop State by Queuing in the loop of error/Shutdown management. But I don't know how to activate the "Program.Shutdown" event by program and thus access the function "Waiting to notify" inside.

    I tried to put the function "Waiting to notify" outside the structure of the event, so the event-handling loop never ends. Placing timeouts on the "wait for declaring" and the structure of the event makes the programme of work, but I want to avoid using timeouts because I don't want to turn my event program into a program of polling stations. I would also avoid using variables or nodes property to stop loops, because that requires the creation of a control/indicator for something that the user does not need to interact with.

    Thank you!

    First of all, close the notifier outside loops with your queues.  Second, you must use a user event to send the message to the event structure loop so that it stop in the case of the stop on an error.

  • Slide with several digital poster Down filter event Bug button?

    A key event filter on a slide with several digital screens down does not work as expected when not waived. If you for example tab of this slide with two digital screens digital display, the cursor remains on his position, rather than get KeyFocus to the next control. Same behavior at fault if you want to move the cursor on the left/right keyboard, nothing happens. Anyone an idea why?

    A simulation of that VI is attached. All other controls, a Slide with a digital display or a standard digital control, the key Down event filter behaves as expected... I tested in versions 8.5.1 LV (attachment), LV2012SP1 and LV2013.

    A teammate now found a solution or workaround. We do not know if this is the way it should be, if yes, then it's a bit hidden, but it works!

    It seems that the cursor needs to know on what digital display the FocusObj is when you use the event notifier KeyDown. Then, when to get the reference of the digital display active and the wiring of this reference to the terminal FocusObj filter event everything works as expected, numbers of tabs, typed, cursor etc and have to filter and notify events structure to the event.

    A vi and a printscreen are attached.

    The question is probably due to the specialty of slides and the class NumericWithScale in general, as its digital displays are a little under References and during the implementation of the features of event KeyDown for the class NumericWithScale filter, LV simply does not know on which side of the main action control part must be executed.

    Or someone has a better solution and explanation?

  • Generate a binary sequence with the NI USB-6008

    Hi all

    I'm new to LabView and I am trying to generate a binary sequence with a box NI USB-6008. The sequence, I'm currently generate is a counter of 5 bits, i.e. 00000 00001 00010, 00011... 11110, 11111 placing each bit in a different digital IO of the of the 6008 NOR, so that I can use the County as the bits of selection in a decoder/demux.

    I managed to simulate the binary sequence and produce a graphical interface, but I have not found how to generate the sequence of bits with the NI 6008.

    Totally, I'd appreciate any help you could provide. Thank you very much.

    Hi JosephM,

    Good Afternooon and I hope your well today.

    I just tested the code on a 6008 and also released the above code is very complex - I was for some reason any fixed on using Boolean tables.

    Please see the attached code, in LabVIEW 8.6.

    Mind you, I have configured the task as a channel for all lines. i.e. digital single I spent, is the task value should apply to all channels selected in the entry. So if you select only port0/Dev8/$line0 for example, the DAQmx driver will examine the LSB of the digital and work so $line0 must be true from the false. It will NOT update all other channels. So when I select line0:4 - it will update the first 5 lines (bits) in digital. As the code generates a number from 0-32 he emotional generates 00000 to 11111.

    I hope this finds you well and sorry for the first post!

  • problem with several graph XY axes

    Hallo,

    I'm tracing different variables in the same plot with several axes. I have the following problem (see attachment)

    the y axis secondary on the right side of the plot has a large area of him and one of the other secondary axis falls right above others. I tried it in the two labview 8.2 and 8.5 with the same results.

    any ideas?

    Thank you in advance,

    Thodoros

    Try the following movements:

    Right-click-> popup menu-> advanced-> reset scale layout

Maybe you are looking for

  • Satellite L50 - B - 1 KG - won't power on

    Hello I can't turn on my Satellite phone (L50 - B - 1 KG) since last night . After a few Win 7 updates, I restart the system as required, but it does not start...I try to press the power button, but does not change a thing...Also I've packed on the c

  • Pavillion G6: Directors

    How can I go in safe mode I forgot my admin passwordSound I have reset

  • When I copy the files to another drive I lose sight that I put in place

    I have a folder of music with MP3s set up for show, track, year, artist, Album name, duration, and then sorted by Album title and show in groups. When I try to copy these files to a different drive (such as a backup copy), they lose that point of vie

  • decommissioning of package installed windows 7

    I recently rebooted windows 7 on my wife and my own computers dell laptops. I chose ultimate pro for two machines, but his machine did not accept the product key and is him asking to activate. Y at - it a shortcut to push back on his machine to the v

  • Windows Photo Viewer

    Nice day! :) I have a problem on Windows Photo Viewer, I have an image in jpeg file and im going to print with the click right to command and print but the photos in print does not appear and his close automatically. What should I do? Any help. Thank