Combination of name and the sequence

Hi all

I have a table that has the following columns:

Title, Class_name, sub_class_name, combination. (Of course, I have several tables maintenance, but it is the large table). the lov class_name parameter, sub_class_name is lov class_name cascading. in the field of the combination, I need class_name abbreviation-sub_class_name short-sequence number. This sequence number for each combination must start at 1.

Now I lov and sub name class class name lov and when the user selects these two columns the combination appears with any number (I have a table of maintenance for this).

For example = temporary payroll, class_name = Record staff (short PR), sub_class_name = mass pay (PAY abbreviation), the combination should show PR-COMPENSATION-1. Once again if a different title with the same class name and we subclass the combination should show PR-COMPENSATION-2. but IF the name of class and sub-class is different once again the combination should start from 1. I could create the combination but these number are not getting the correct number. Could you please help me on this.

Thank you

Stéphane

Hello Pascal.

A simple way to calculate the sequence number for a combination of the two fields is to do something like this:

select nvl(max(sequence_num), 0) + 1
  from my_table
 where class_name = :P1_CLASS_NAME and
       sub_class_name = :P1_SUB_CLASS_NAME

If one or more lines with the selected class name subclass name combination already exist in the table, max returns the sequence more high number with this combination, and then we add 1. If no line with this combination doesn't exist, max returns the null value which is then replaced by the nvl 0 and then we add 1.

But I must point out two things:

(1) your table design has a few redundancies in it that can cause you to hurt later. Your field of combination consists of the values of two other fields. In addition to being low standards, what happens to your field of combination if the user changes the fields class_name or sub_class_name? Minimally, you will need to update the characters in the field of combination to remain consistent, but you should also consider how the new combination would affect the sequence number. That gets into some difficult design problems that is why it always drives crazy me when users want to ID fields that contain information of business integrated, but anyway... to address the issue of standardization at least, I would like to suggest a class_name field, a field of sub_class_name and a field of sequence_num and then put the fields when you need to display.

(2) If this form can be used by multiple users at the same time, you want to calculate the next sequence number when the line is saved - not when the two LOV is chosen. Raison d'etre, what happens if two users select the same combination at roughly the same time? If you calculate during the recording, then the two users cannot get the same next number in sequence. If you calculate as soon as they select the two LOV, there is a chance, they will receive the same next number in sequence. The way I'm usually something as it is to calculate the number on record and then display it in the message of success of the process - something like "PR-COMPENSATION-2 Record saved successfully."

Hope this helps,
John

If you find this information useful, please indicate the 'useful' or 'correct' post so that others benefit. *

Tags: Database

Similar Questions

  • Is it possible for Firefox to remember multiple combinations of name and password of the user to a Web site?

    My husband and I use Yahoo! Mail, but each has our own account. We are constantly put in front and in back. Enter the full name of the user and the password by hand each time it's boring, but it's not fair for one of us to have Mozilla to remember the user name and password. It would be great if there was a way for Mozilla to memorize our usernames and passwords. No idea if there is a way to do something like that? Thank you!

    30 Firefox should be able to store more than one name and password to the Yahoo site.
    Firefox should offer to store the name and the password for the other institutions.

    Make sure that you are not Firefox running in permanent private browsing mode (don't remember history).

    • Tools > Options > privacy > Firefox will be: "use the custom settings for history".
    • : Uncheck the [] "always use the private browsing mode.

    You can control and manage permissions for the domain in the tab currently selected through these steps:

    • Click the address bar onthe Site identity button"(globe/lock)
    • Click on 'More information' to open ' tools > Page Info "with the Security tab is selected
    • Go to the permissions tab (Tools > Page Info > permissions) to check the permissions for the domain in the currently selected tab

    There are other things that need your attention.

    Note that your system details list shows several Flash plugins.

    • Shockwave Flash 13.0 r0
    • Shockwave Flash 12.0 r0

    You can find the installation path of the plugins on the topic: plugins page.

    You can view the installation folder of Flash player for multiple Flash player plugins and delete older versions of the plugin (NPSWF32) and possibly (re) install the latest Flash Player.

    • (32-bit Windows) C:\Windows\System32\Macromed\Flash\
    • (Windows 64 bit) C:\Windows\SysWOW64\Macromed\Flash\
  • How can I remove the user name and the image of Windows XP new Start Menu

    Two questions:

    1. How can I delete the user name and the image of Windows XP new start; and

    2. my computer keeps asking me to press the F1 key to start Windows.  How to skip this part?

    Thank you.

    Hello

    The image of user account can be removed by disabling the Welcome screen. Or, by opting for the classic Windows theme. Follow the method described in this article, if you want to remove the user name and the picture in the Start Menu, without disabling the Welcome screen and Windows XP theme.

    For those who want to delete the user name and the image of user account from the Start Menu, in order to have a blue white Panel at the top, try this:

    Registry warning
    Important: This section, method, or task contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click on the number below to view the article in the Microsoft Knowledge Base:

    How to back up and restore the registry in Windows
    http://support.Microsoft.com/kb/322756/

    Step 1:

    a. start Windows Explorer and go to this folder:
     
    C:\Documents and Settings\All Users\Application Data\Microsoft account images

    b. in this folder, rename the BMP file that corresponds to your user account.
     
    (For example, if your user name is Robert, rename Robert.bmp to old_Robert.bmp)

    c. then rename the following folder:

    C:\Documents and Settings\All Users\Application Data\Microsoft account Pictures\Default pictures
     
    to something else, for example,.
     
    C:\Documents and Settings\All Users\Application Data\Microsoft account Pictures\No_Default images.

    Step 2:
     
    To remove the user name, follow these steps

    a. Click Start, click "RUN" and type "regedit.exe" and navigate to this key:
     
    HKEY_CURRENT_USER-Software-Windows Microsoft\------CurrentVersion-policies-Explorer

    b. in the right pane, the value NoUserNameInStartMenu-value data 1.

    c. close Regedit.exe and restart Windows.

    You'll find yourself with a blue area at the top of the Start Menu.

    Regarding the pressing 'F1' to start Windows, you have made no changes or was there a system crash after which the problem started?

    You may need to change the boot sequence in the BIOS to the default settings. I recommend you contact your PC vendor for this.

    Warning of the BIOS:
    BIOS change / semiconductor (CMOS) to complementary metal oxide settings can cause serious problems that may prevent your computer from starting properly. Microsoft cannot guarantee that problems resulting from the configuration of the BIOS/CMOS settings can be solved. Changes to settings are at your own risk.

  • Display the name of the tag as the column name and the value in the tag as a row of data from the input string.

    Hi Forum members,

    I am looking for a query display the name of the tag as the column name and the value in the tag as a row of data.

    I have to print the values within the tag to a file by choosing the value of the flags. the sequence of the tags will vary each time, as the tag name will change dynamically.

    So here is the example of input data and the expected output. The string in the text column must be separated as the column names and values.

    Input data
    Select 1 as seqno,' < > 0210A 50 4f < / 4f > < 5f20 > TEST CARD 16 < / 5f20 > < 5f2a > < / 5f2a > < 82 > 1 c 00 < / 82 > ' double text


    Output:

    Seqno 4f 5f20 5f2a 82
    0210A 50 16 1 00 TEST CARD 1

    Please help me by providing your entries on this.

    We use the version of Oracle 11.2.

    Note: This is not the XML string

    Thank you

    Shree

    with

    data in the form of

    (select 1 as seqno,'<4f>0210 A 50<5f20>TEST CARD 16<5F2a><82>00 1' text of all the double union)

    Select 2 as seqno,'XYZ<4F>0210 A 50<5f20>TEST CARD 16<5f2a><82>00 1' text of all the double union

    Select 3 as seqno,'<4f>0210 A 50<5f20>TEST CARD 16<5F2A><82>1 00XYZ ' text of all the double union

    Select option 4 as seqno,'<4F>0210 A 50<5F20>TEST CARD 16<5f2A><82>1 00XYZ' double text

    )

    Select d.seqno, x.*

    d the data,

    XMLTable ('/ root')

    by the way xmltransform (xmltype ('': replace (replace (text,'<><>'),)))

    XmlType (q'~http://www.w3.org/1999/XSL/Transform "version ="1.0"> ")

                                                     

                                                       

                                                         

                                                       

                                                     

                                                     

                                                       

                                                         

                                                       

                                                     

    ~'

    )

    )

    path of columns '4f' varchar2 (10) "tag4f."

    path of "5f20' varchar2 (30)"tag5f20. "

    path of '5f2a' varchar2 (10) "tag5f2a."

    path of varchar2 (10) "82" "tag82.

    ) x


    SEQNO 4f 5f20 5f2a 82
    1 0210A 50 16 TEST CARD - 1 00
    2 0210A 50 16 TEST CARD - 1 00
    3 0210A 50 16 TEST CARD - 1 00
    4 0210A 50 16 TEST CARD - 1 00

    with

    data in the form of

    (select 1 as seqno,'<4f>0210 A 50<5f20>TEST CARD 16<5F2a><82>00 1' text of all the double union)

    Select 2 as seqno,'XYZ<4F>0210 A 50<5f20>TEST CARD 16<5f2a><82>00 1' text of all the double union

    Select 3 as seqno,'<4f>0210 A 50<5f20>TEST CARD 16<5F2A><82>1 00XYZ ' text of all the double union

    Select option 4 as seqno,'<4F>0210 A 50<5F20>TEST CARD 16<5f2A><82>1 00XYZ' double text

    ),

    Chopper (seqno, Key, value, String) as

    (select seqno,

    regexp_substr (text,'<(.+?)>', 1, 1, null, 1),

    regexp_substr (Text,'>(.*?))

    regexp_substr (text,'<.+?>. *? ) (.*) $', 1, 1, null, 1). » <>'

    from the data

    Union of all the

    Select seqno,

    regexp_substr (String,'<(.+?)>', 1, 1, null, 1),

    regexp_substr (String,'>(.*?))

    regexp_substr (String,'<.+?>. *? ) (.*) $', 1, 1, null, 1)

    Chopper

    where regexp_substr (string,'<(.*?)>', 1, 1, null, 1) is not null

    )

    Select '4f', seqno, '5f2a', '82', '5f20.

    of (seqno, lower (key) select key, value)

    Chopper

    )

    Pivot (max (value) for key in ('4f' as '4f', '5f20' as '5f20', '5f2a' as '5f2a', "82" as "82"))

    Concerning

    Etbin

  • They showed me a way to do a massive bowl of spam, but I don't remember the keys and the sequence to do.

    I recently had installed Thunderbird and more 10,000 e-mails were transferred. They showed me a way that if I press Ctrl and another sequence of keys, I could scroll through many emails and send them to 'trash' collectively, instead of having to delete each message individually. I don't remember the keys and the sequence to do.

    CTRL + a (for 'all') will select all of the visible items.

    http://Xenos-email-notes.simplesite.com/417754237

  • In the Photos of El Capitan how to record a double published in a separate with its own name and the ID file file?

    In the Photos of El Capitan how to record a double published in a separate with its own name and the ID file file?

    Only by exporting - with Photos (and iPhoto and Aperture) - you can have several versions of an image by duplicating the image (control - D), but this does not create an image file separated until you export - it creates a separate edit list in the database that applies to the original when you watch or export the photos

    Photos as it were its predecessors is a non-destructive control Digital Asset Manager (DAM) which does not any changes to files in the database but built a list of validation

    LN

  • I forgot my icloud user name and the password, my ID apple won't do me in my phone how to lay or clear everyhing so that I can use my phone again?

    I forgot my icloud user name and the password, my ID apple won't do me in my phone how to lay or clear everyhing so that I can use my phone again?

    https://iforgot.Apple.com/password/verify/appleid#! & section = password

  • Send the name and the value of the control to Subvi

    Hi all

    I am trying to send the names and values of the controls to a Subvi.

    I know that I can check out the name and the value of the control by using a property node, but I was looking for a way to make is easy for the programmer to use.

    I think some sort of bundle function, it records the name and the value of the control, but I would like the programmer to be able to connect a random number

    controls to the Subvi without having to specify the number of controls Anywhere.

    I know there is stuff in labview configuration file, but it seems a bit more complex, so what I want to do.

    Also, I know that I can use the OpenG toolkit, but I will not use additional LabVIEW modules, as this VI may run on several different computers.

    I hope I made my problem clear enough!

    Good day

    Concerning

    Tommy

    What, creating an array of references to the command.  On the hand, you will need to fill the table with control references that you want to send to the Subvi.  In the Subvi, use a loop For with indexing to get every reference, and then use the nodes property to get the name and value.

  • Get the name and the data type into an object?

    Hello

    I would like to know if there is a way to get the names and the types of data encapsulated in an object of labview?

    For example, let's say I make a simple object, called myObject to be commonplace, with private data: myObjectName (string), myObjectValue (int 32) (etc.)

    So, how to build a method to return the type of the data of myObjectValue, or infact back the names and types of all data in the object field, which could be a lot?

    Thank you

    Paul.


  • Can not connect - I enter a password it gives message to make sure that the name and the password are correct.

    Can not connect to my tablet PC.  When the powers of the Tablet, it ask for password and user name of ny, but when I get home it gives message to make sure that the name and the password are correct.  I was on the shelf and I tried to change the workgroup and domain, it askes restart once I did c Hanger, but now I can not open yet.  The PC is running XP and it is old, 15 years!  Help!

    Hi ERASMOTERAN,

    Please see the below article mentioned on the Microsoft Policy on lost or forgotten the password.

    Microsoft's strategy concerning lost or forgotten passwords

    See also:

    Keep secure passwords - Microsoft strategy on move the passwords

  • Error file compressed (zipped) folder is invalid when the folder name and the location is OK

    I have a folder zipped on my computer which has 2.84 MB of data in it.  I can access the folder and check the properties of it using windows Explorer.  But when I try to open the file, I get the message "windows cannot open the folder.  "The compressed (zipped) folder [the name of the location and file names] is not valid.  Why this file is not valid.  The name and the location is OK?  Why I can't access this folder?  I tried the extrace all files option and tap of properties has the file open by windows Explorer (which opens at all other files zipped, I downloaded).

    Hi Bill,

    Thanks for choosing Windows Vista Forums.

    Have you tried re - download the file and open it?

    The file may not have been packed correctly so, make sure that you re - compress the file and open.

    Let us know how it works.

    Kind regards
    Technical support of Microsoft-yama.
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • LOV cascading if I don't have only one table with the customer name and the name of the product in the ADF.

    Hi Please help me how to use cascade, if I don't have only one table with the customer name and the name of the product in the ADF... I use Jdeveloper 11.1.

    For the client, I used customer VO with client list to fill but to populate the product that I use bind variable PrODUCT_NAME select distinct from TABLE where client_name =: bindCustomer

    so first of all, I need to set the variable of liaison on behalf of the selected customer.

    Can you please tell me how to set this variable binding in this case.

    After you set the LOV to your product attribute, correspondting VO in the LOV will appear under view accessors.

    Change the accessor of the view, you will see the variable binding. Set its value to the customer field of the parent object.

    Visit this link: https://www.youtube.com/watch?v=nXwL2_RP7AQ

    Kind regards

    Elias.

  • How can I get rid of the blue name and the date that is entered under the signature

    How can I get rid of the blue name and the date that is entered under the signature

    Yes! you see Configure text where you can uncheck date Logo etc...

    For more information, see image

  • Adding host name and the name of tablespace in the alarm e-mail

    I'm trying to figure out how I can put the host name and the name of the table space in the e-mail alarms.

    Rule name: _DBO - use of Tablespace

    Scope of the rule: DBO_Cust_DBO_Cust_Tablespace_pct2 where nom_tablespace! like '% UNDO % '.

    Tried the following queries to run the query Condition and did not

    return scope.get("tablespace_name").get ("value")

    return scope.get("tablespace_name").get ("name")

    Do you have any suggestions on how to display the host name and the name of tablespace in the alarm email?

    Using scope: DBO_Tablespace

    hostname = scope.get('monitoredHost/name')

    tablespaceName = scope.get ('tablespace_name')

    Kind regards

    Brian Wheeldon

  • I am using oracle 11g express edition, how I can change the service name and the port number?

    I am using oracle 11g express edition, how I can change the service name and the port number?

    I am using oracle 11g express edition, how I can change the service name and the port number?

    What do you mean by "port number"? HTTP port (usually 8080), or listening port (normally 1521)?

    To change the name of the service, you can use (as a DBA or SYSDBA)

    SQL > alter system set service_name = '';

Maybe you are looking for

  • I lost the module Manager icon in the tabs menu, how can I get it back?

    When I open the Firefox menu (=), the 'Supplement' icon is not there. If I try to customize, I can't find the icon of any place, as shown in the attached picture.I want to manage my Add on.Thank you for your help.

  • Cannot install Windows XP on Portege S100 series

    Hello!!Help, please!I have a Toshiba portege S100, I think that since 2005.I try for a few weeks to install a windows xp.This thing has become impossible for me. I tried hundreds of xp, but never work. He can't see the drive hard because I assume tha

  • IM problems

    I'm not sure if this made the point before, but when I'm IMing people, sometimes their messages do not appear. I move up in the chat and find that he was sent to an earlier date and that it was not where it should have been. It is usually said that i

  • HP Pavilion 23-H120: upgrade CPU information

    I'm unable to find information about the processor intel core i5 or core i7 upgrades for this pc

  • Apple Loops and tempo (distortion)

    Hi, I am really desperate to try to find a solution to this problem. But it seems that no one knows the same thing. I just purchased Logic Pro X. Im using a macbook mid-2014 race 13-inch pro retina El Capitan 10.11 The problem is really weird. When u