concatenate a string and a sequence number

Hey guys,.

I use jdeveloper Studio Edition Version

I would attribute a sequence that I have attached a string to my PK as a AP2013081000 attribute.

Could someone help how the above application can be achieved in the adf?

Here are the trigger and how could I use it to record in my attribute?

create or replace












I used the DBSequence data type

only for the












Kind regards


You should be able to use the groovy for that approach. In this case you needn't pl/sql. Binary decompilation ADF: Groovy expression for assignment DB Sequence value for an attribute of type String should help you get started.


Tags: Java

Similar Questions

  • Difference between the SNA and log sequence number

    Hi all

    Please, is there a difference between the number of number (SCN) and sequence of journal system change ?

    Thank you.


    select sequence#, first_change# from v$log_history order by 1;
    select sequence#, first_change# from v$archived_log order by 1;

    Hemant K Collette

  • How to set the default value of the attribute with a sequence number? Is it possible to add a string to like abc0001?

    Mr President.

    How to set the default value of the attribute with a sequence number? Is it possible to add a string to like abc0001?


    For the date, you can use groovy expression adf.currentDate to set the current date. reference

    You already have ways to use the sequence.

    How do you add a new value in the form. You're creating a new line of your page (user interface) and by engaging with validation operation? Unless you commit you will not be able to see anything in the table.

    Thank you

  • Insert/update of the XML help merge and to generate the sequence number


    I'm working on Oracle 11 g.

    I have a doubt with loading XML.
    I get an xml and I need to insert or update data in a table. What I can accomplish by using the MERGE statement.
    But there is a column in A table, I need to fill with a sequence number, based on the data sent in the xml file.
    The XML does not send the data in this column.
    And I have to make sure that sequence is created according to the order in which the records are present in xml.
    For example the MERGER is insert five rows and update two lines and insert again 3 rows of xml in table A. The sequence number must be created in the same order for the column in the table.
    Also for every new XML, the sequence starts with 1 and ends with the number of records in the xml file. I can't create a sequence and use the seq.nextval.

    Please let me know, there is a way to achieve this.

    Thank you!

    Published by: 934451 on 8 August 2012 06:33

    Published by: 934451 on 8 August 2012 06:50


    As a result of your previous thread: {: identifier of the thread = 2403469}

    You can use the clause for ORDINALITE in XMLTable to generate the necessary sequence:

    MERGE INTO target_table t
    USING (
      SELECT x.seq_num, x.pk_id, x.col1, x.col2, ...
      FROM XMLTable(
             passing my_xml_doc
             columns seq_num FOR ORDINALITY
                   , pk_id   number       path 'ID'
                   , col1    varchar2(30) path 'COL1'
                   , col2    varchar2(30) path 'COL2'
                   , ...
           ) x
    ) src
    ON ( t.pk_id = src.pk_id )
     SET t.seq_num = src.seq_num
       , t.col1 = src.col1
       , t.col2 = src.col2
       , ...
     (seq_num, pk_id, col1, col2, ...)
     VALUES (src.seq_num, src.pk_id, src.col1, src.col2, ...)
  • Target using the VAR String and number

    This should be simple, how to target a VAR using a string and a number, the idea is that I can change the number to target this VAR.

    var gogo1:Number = 12

    var gogo2:Number = 89

    trace ("gogo" + 2)

    I'm after the trace to be 89 NOT gogo2

    trace(this["gogo" + 1]);


    Kenneth Kawamoto

  • Comparison between a static value type String and a type perhaps unrelated number

    Well I have another question of my book of text... so far I typed in exactly how they ask me to and even followed some screenshots of examples of theres. All me looks good, but of course, I'm the only one with an untrained eye.

    When I run this film I get a compiler error of: 1176 20 comparison between a static value type String and a type perhaps unrelated to line number

    Here is my code


    var numberOfCookies:Number = 0;
    startBtn.addEventListener (MouseEvent.CLICK, getCookies);
    function getCookies(event:MouseEvent)
    numberOfCookies = (Math.floor (Math.random () * (10)) + 1);
    var n: Number = 0;
    While (n < numberOfCookies)
    var cookieInstance:cookieMC = new cookieMC;
    addChild (cookieInstance) .x = (Math.random () * 200) + 20, (cookieInstance) there (Math.random () * 150) = + 220;
    n ++ ;
    goBtn.addEventListener (MouseEvent.CLICK, checkNumberTyped);
    function checkNumberTyped(event:MouseEvent)
    If (checkBox.text == numberOfCookies) //this is the line 20
    gotoAndPlay (2);
    on the other
    gotoAndPlay (3);

    The error indicates well enough the problem... the compiler doesn't like to compare different types of things.  In your case, a type is a string, and the other type is a number.  If you need to force one of them to become another type, and you can go either way...

    If (checkBox.text is String (numberOfCookies))


    If ((checkBox.text) Number is numberOfCookies)

  • Min and Max of the sequence number


    I have a table called pins (lot number 4,
    Sequence number (8)

    I have data in the table:
    batch sequence
    386 100
    386 101
    386 102
    386 800
    386 801
    1 387
    2 387

    I want to know by draw the low values and high for sequence number, is the result, I am looking

    batch min (sequence), max (sequence)
    386 100 102
    386 800 801
    387 1 2

    Oracle 10g rel2

    Thank you


    You want something like this:

    WITH       got_grp     AS
         SELECT     lot
         ,     seq_num          -- SEQUENCE is not a good column name
         ,     seq_num - ROW_NUMBER () OVER ( PARTITION BY  lot
                                                      ORDER BY      seq_num
                                          ) AS grp
         FROM    pins
    --     WHERE     ...     -- any filtering goes here
    SELECT       lot
    ,       MIN (seq_num)          AS min_seq_num
    ,       MAX (seq_num)          AS max_seq_num
    FROM       got_grp
    GROUP BY  lot
    ,            grp
    ORDER BY  lot
    ,            min_seq_num

    If I understand the probem, you want to GROUP BY, but many does not define groups by itself: each contiguous set of seq_nums in a batch is a separate group. In each of these groups, the difference between seq_num and a meter which reflects the order of seq_num generated in the query (using ROW_NUMBER) will be constant.

    This assumes that seq_num is an integer, and this (lot, seq_num) is unique.
    If this is not the case, the above query will have a small adjustment.

    If you want to display the INSERT statements for your sample data, then I could test this.

  • time, SNA and SEQUENCE number

    10g R2, how can I find the relationship between time, YVERT and SEQUENCE number? I mean how to find SNA or SEQUENCE number corresponds to the given time.

    Thanks a lot before.
    SET UNTIL TIME 'Nov 15 2002 09:00:00';
      # SET UNTIL SCN 1000;       # alternatively, specify SCN
      # SET UNTIL SEQUENCE 9923;  # alternatively, specify log sequence number

    You can query V$ ARCHIVED_LOG and V$ LOGMNR_CONTENTS for your condition.

    You can find details on these views to:

  • Motherboard model H535 failure - the type of machine and the serial number invalid after replacement

    Does anyone know how to set the new Type of Machine and the serial number after a motherboard for a replacement model H535?

    The motherboard has recently failed on my model H535 (7 months after the expiration of the warranty - thanks, Lenovo). No local garage would agree to replace due to its nature of owners (thanks, Lenovo). I spent about four hours on the phone being bounced into back-and-forth between the many support staff (usually combined) Lenovo in sales, technical support, support of parts of IBM and various other departments (thanks, Lenovo), which one has suggested that I might have to try to find a motherboard on Ebay or Amazon for my computer in less-than-2-year-old. However, I finally get to someone at Lenovo, which has been able to sell a motherboard - for 2/3 of the cost of the original computer.

    Now, I installed the motherboard, and it works. However, during each boot, I get a POST with two beeps error which reads as follows:

    00CE error: Machine Type and serial number is INVALID

    Start of manufacturing sequence is taken if no selection is made

    I presume that the BIOS on the new motherboard must be programmed with the right Type of Machine and the serial number of my computer. I've read various things on the Internet about what to do, as updating the BIOS (I can not even find a BIOS under "downloads" of support for the H535 - thanks, Lenovo model), using WinPhlash (I apparently need one kind of BIOS ROM file to make it work, I don't have), getting a Lenovo hardware maintenance disk for my model (which apparently isn't available for other special people only me - thanks Lenovo), etc.

    The waiting time for Lenovo support are ridiculously long, and almost every customer support person is ridiculously uninformed on the difference between one of their computer models, and even less their motherboards (thanks, Lenovo). I am amazed and extremely frustrated. It shouldn't be rocket science.

    On a side note, I initially bought the computer from Staples with a credit card with extended warranty protection, which means I can get a refund for repair. Although the motherboard came with a packing list, no Bill has been provided by Lenovo, and I couldn't make them send one - or maybe even with success to explain what a Bill is (thanks, Lenovo).

    Well, Lenovo support was useless, and any alleged authorized suppliers were in fact still suppliers or could help with my problem. But I was finally able to fix it myself. Once I found the right piece of software, it has been fixed in less than a minute.

    My BIOS is by American Megatrends, and I discovered that they have a set of utilities that includes a called AMIDEDOS. It is intended for manufacturers to be able to change the strings of text stored in the BIOS for things like the manufacturer, product name, Version, number series, UUID, SKU number, family, etc., that is what I had to do. It is not intended for use by consumers, but it's there.

    When I ran the "DMIEdit.exe" program AMIDEDOS (clicked and ran as administrator from 10 Windows) and click on "System information" from the list, I saw "Product Name | STRING | Invalid' and ' serial number | STRING | NOT VALID ". The other fields appeared to have valid entries. I double-clicked on the fields valid and changed their "H535 model" and the serial number of my computer, respectively and then clicked on "Update all" at the top.

    Much to my surprise, he reported that he had successfully registered the new information. And, perhaps even more surprising is the fact that, when I rebooted, the double beep and the warning about the type of computer not valid and serial number have disappeared. In addition, the BIOS showed I had entered the new values, and the 'Manufacturing Boot Sequence' option (I understand can be much slower than a normal boot) had disappeared.

    Again, I'm a little surprised simple it was actually solve the problem once I got the correct software, or Lenovo part nor American Megatrends apparently offers to the owners, and it took hours and hours of research and research to understand. Use this information at your own risk, however, as playing with BIOS apparently can lead to problems not easily solved. That said, the modification of these text strings seems relatively safe.

    I will mention that I also ended up changing the method of "LEGACY" to "UEFI" boot in the BIOS after noticing that the selection.

  • Generate the sequence number

    create table t
    (id int primary key,
    dt date,
    file_no int,
    batch_no int,
    data varchar2(5)
    insert into t values (1,trunc(sysdate),23,113,dbms_random.string('a',5)); -- 1.1.1
    insert into t values (2,trunc(sysdate),23,345,dbms_random.string('a',5)); -- 1.2.1
    insert into t values (3,trunc(sysdate),23,345,dbms_random.string('a',5)); -- 1.2.2
    insert into t values (4,trunc(sysdate),23,543,dbms_random.string('a',5)); -- 1.3.1
    insert into t values (5,trunc(sysdate),23,543,dbms_random.string('a',5)); -- 1.3.2
    insert into t values (6,trunc(sysdate),23,543,dbms_random.string('a',5)); -- 1.3.3
    insert into t values (7,trunc(sysdate),24,333,dbms_random.string('a',5)); -- 2.1.1
    insert into t values (8,trunc(sysdate),24,333,dbms_random.string('a',5)); -- 2.1.2
    insert into t values (9,trunc(sysdate),24,333,dbms_random.string('a',5)); -- 2.1.3
    insert into t values (10,trunc(sysdate),24,222,dbms_random.string('a',5)); -- 2.2.1
    insert into t values (11,trunc(sysdate),24,222,dbms_random.string('a',5)); -- 2.2.2
    insert into t values (12,trunc(sysdate),24,111,dbms_random.string('a',5)); -- 2.3.1

    Oracle 11.1

    How can given this structure and data, I generate sequence at the end of each line numbers? Basically, the sequence number (x.y.z) is such that x (1.n) is awarded for each unique value in file_no. In each x, y (1.n) is assigned for each unique value of batch_no. Within each y, z (1.n) is assigned for all records of this batch. Sample data shows only dt but all sequences must reset and start over when dt changes.

    I tried using row_number() over (partition by dt, file_no) and such but nothing quite gives me what I'm looking for.

    Help? Thank you


    HELEN wrote:

    If you look at my CREATE TABLE, the ID column is a primary key and represents the order of the data in the file.

    Done batch_no = 100 come before or after 101?  Batch_no = 100 a ID so much until after the id for batch_no = 101.

    Good point, but that won't happen because of the way the 'record' is generated. All batch_nos will be contiguous. So if batch_no 100 comes earlier in the file as 101, it should get some 2nd highest sequence number. Otherwise, lower. Basically, the 2nd part of the sequence must simialar logical number to the 3rd party (i.e. order by id) but that messes things. Still struggle with it. Any help appreciated.

    I think I understand.  You say that, because of the way that the ID is issued, it wouldn't matter if you used the highest id of the batch_no, or the lowest id, or the average, or if you chose one at random; you would get the correct order in all cases.

    The following query uses the id low in the order file_no and batch_nos.

    WITH got_min_ids AS


    SELECT id, dt, file_no, batch_no, data

    MIN (id) over (PARTITION BY dt


    ) AS min_id_file_no

    MIN (id) over (PARTITION BY dt



    ) AS min_id_batch_no



    SELECT id, dt, file_no, batch_no, data


    ORDER BY min_id_file_no


    || '.'



    ORDER BY min_id_batch_no


    || '.'




    ORDER BY id

    ) AS seq

    OF got_min_ids

    ORDER BY dt, min_id_file_no, min_id_batch_no, id


    The main request is in fact what I posted before, but instead of

    "ORDER BY file_no" and "ORDER BY batch_no", she uses

    "ORDER BY min_id_file_no" and "ORDER BY min_id_batch_no".  These values are calculated in the subquery, got_min_ids.

    Output (including the additional sample data I posted):


    ---------- ----------- ---------- ---------- ----- ----------

    1 23 25 April 2014 113 dXAad 1.1.1

    2 345 23 25 April 2014 pumVG 1.2.1

    3 345 23 25 April 2014 jLnbO 1.2.2

    4 23 25 April 2014 543 xKhCL 1.3.1

    5 23 25 April 2014 543 JQoWk 1.3.2

    6 23 25 April 2014 543 YjJeC 1.3.3

    7 24 25 April 2014 333 WjQNE 2.1.1

    8 24 25 April 2014 333 ScWSL 2.1.2

    9 24 25 April 2014 333 pXDSD 2.1.3

    10 222 24 25 April 2014 OSajn 2.2.1

    11 222 24 25 April 2014 QNpix 2.2.2

    12 24 111 OwkjI 2.3.1 April 25, 2014

    91 100 99 25 April 2014 sRWmT 3.1.1

    93 100 99 25 April 2014 IAEFd 3.1.2

    92 101 99 25 April odQxh 2014 3.2.1

    I know you said that this situation is impossible (that is, if ID 91 and 93 have the same batch_no, then id 92 cannot have a different batch_no), but the application works even if this rule is broken.

  • How generations for db in the XSLT file sequence number

    Hello gurus SOA,.

    I have a requirement, please see below

    I am using SOA

    Insert a webservice to db, XSLT call, I have 10 items next to the source and 11 items next to the target.

    • Source to target first 10 mappings are performed.
    • Now the requirement is, for the 11th element target we must pass a sequence number to the database targeted, means-(sequence number must be generated for each execution of the XSLT execution)

    How do the last point?

    Can someone help me please


    You can pass the sequence number in the 11th element to help. "oraext:sequence-next-val("Sequence name as a string", "Datasource as a string") function.

    Kind regards


  • Trying to recover a database using HTTPService sequence number

    I try to return a sequence number of a database and assign it to a variable "recordID".

    When I call the getNextRecordID function with a button, the next sequence number returned ok.

    The problem is that each subsequent call to this function returns the same number. Only when I close

    and reopen the application needs to change.

    Any ideas?


    private var recordID:String;

    private void httpResult(event:ResultEvent):void


    recordID = ";

    recordID = event.result.root.sequence.seq;  Sequence.SEQ is returned from the database via xml


    private function getNextRecordID (): void


    var getRecordID:HTTPService = new HTTPService();

    getRecordID.url = http://.../getNextSeqNo; call to the procedure of oracle database

    getRecordID.addEventListener ('result', Httpresultat);

    getRecordID.send ();


    most likely the request is cached by the browser where subsequent requests are back the same number without hitting the server at all. try to add a random number to the url:

    random var: int = new Date () .toTime (); or something like that to get ms right now!

    getRecordID.url = "http://.../getNextSeqNo? r ="+ random

  • search string and convert whole real or 8-bit 32 bit

    I was hoping to get some advice on how I could search for the following string and convert it to a real number or an integer.  The following data is output as a device ascii characters and I would look for both in each line (starting with 7699,72 seconds in this case) and convert each one to a real number.  Furthermore, I would like to get the integer values in each row (0, but could be 1,2,10,12, etc.) and convert them to an 8-bit integer.  I think that using the template Match followed by analysis of chain would screw that I need, but am not sure how to match in each case. Thank you!!

    7699,72 0

    7699,74 0

    7699,76 0

    7699,78 0

    What are the characters in the white space between the and the numbers?

    Scan chain can probably not what you want.  Note that in the image space characters include spaces, return carriage, line breaks and tabs.


  • How to concatenate the string with a digital command?


    How to concatenate the string with a digital command?

    Thank you.

    I think I forgot to add the semicolon, what you can do is, drag the CONCATENATE function and add semicolon.

  • How to find the sequence number of av

    Downloaded eset uninstaller, but he asked for the sequence number

    Hello Damien,.

    If you don't know, go to the icon of the program or file name and right-click on it and select properties and in the window that opens, read on the top row of tabs up until you get to the Details tab, click to open the tab. The sequence number is given here?

    If not, a freeware for you program called siw (System Information for Windows), download it here: . The application requires no installation, you simply double-click the name of the executable file, and the program opens to the software section. Scan down the list until you find the applications tab. Click to open your list and find details of eset and see if the sequence number is in the list.

    One of these two approaches should solve the problem for you. Let me know how you fare.

    Kind regards


Maybe you are looking for