Update from the field with consecutive number according to the number of entries

Hello

I need to update a field with a consecutive number according to the number of lines where the entries are made which go hand in hand. What it means:
I have
SYSAUSPR AREA SYSGEBIET TYP RANG
182925 600003 4 1 PERSON
1 600004 4 1 PERSON
2 600004 4 1 PERSON
3 600004 4 1 PERSON
17 600004 4 1 PERSON
18 600022 4 1 PERSON
182864 600079 4 1 PERSON
184082 600092 4 1 PERSON
182774 600143 4 1 PERSON
PERSON 183237 600165 4 1
NO 7 600169 4 1
8 600169 4 1 PEOPLE
9 600169 4 1 PERSON
12 600169 4 1 PEOPLE
14 600169 4 1 PERSON
184309 600179 4 1 PERSON
23 600182 4 1 PERSON

I need to change column "RANK" of 1 the number of records that have the same id in the "SYSGEBIET" column (from this example with 600) so that it looks like

SYSAUSPR AREA SYSGEBIET TYP RANG
182925 600003 4 1 PERSON
1. NOBODY 600004 4 * 1 *.
2. PERSON 600004 4 * 2 *.
3. PERSON 600004 4 * 3 *.
17. NO 600004 4 * 4 *.
18. NO 600022 4 * 1 *.

Does anyone has an idea how to solve this problem in an update statement?
Thanks for your help
Best regards
Carsten
SQL> select  *
  2    from  tbl
  3  /

  SYSAUSPR GEBIET  SYSGEBIET        TYP       RANG
---------- ------ ---------- ---------- ----------
         1 PERSON     600004          4          1
         2 PERSON     600004          4          1
         3 PERSON     600004          4          1
        17 PERSON     600004          4          1
        18 PERSON     600022          4          1
    182864 PERSON     600079          4          1
    184082 PERSON     600092          4          1
    182774 PERSON     600143          4          1
    183237 PERSON     600165          4          1
         7 PERSON     600169          4          1
         8 PERSON     600169          4          1

  SYSAUSPR GEBIET  SYSGEBIET        TYP       RANG
---------- ------ ---------- ---------- ----------
         9 PERSON     600169          4          1
        12 PERSON     600169          4          1
        14 PERSON     600169          4          1
    184309 PERSON     600179          4          1
        23 PERSON     600182          4          1

16 rows selected.

merge
  into tbl t
  using (
         select  sysgebiet,
                 sysauspr,
                 row_number() over(partition by sysgebiet order by sysauspr) rang
           from  tbl
           where sysgebiet like '600%'
        ) u
    on (
            u.sysgebiet = t.sysgebiet
        and
            u.sysauspr = t.sysauspr
       )
  when matched
    then update set t.rang = u.rang
/

16 rows merged.

SQL> select  *
  2    from  tbl
  3  /

  SYSAUSPR GEBIET  SYSGEBIET        TYP       RANG
---------- ------ ---------- ---------- ----------
         1 PERSON     600004          4          1
         2 PERSON     600004          4          2
         3 PERSON     600004          4          3
        17 PERSON     600004          4          4
        18 PERSON     600022          4          1
    182864 PERSON     600079          4          1
    184082 PERSON     600092          4          1
    182774 PERSON     600143          4          1
    183237 PERSON     600165          4          1
         7 PERSON     600169          4          1
         8 PERSON     600169          4          2

  SYSAUSPR GEBIET  SYSGEBIET        TYP       RANG
---------- ------ ---------- ---------- ----------
         9 PERSON     600169          4          3
        12 PERSON     600169          4          4
        14 PERSON     600169          4          5
    184309 PERSON     600179          4          1
        23 PERSON     600182          4          1

16 rows selected.

SQL> 

SY.

Tags: Database

Similar Questions

  • Windows XP Professional installation with SP3 OEM CD applied but updates from the Microsoft web site does not-2011

    August 22, 2011 I just do a fresh install of Windows XP Professional formatting the hard drive. I then applied SP3 for an OEM CD, I bought from Microsoft several years (part number X 14-60166-02). Even if it is now at the level of the SP3, the automatic updates from the Microsoft web site will not work. If I bought the latest version of the SP3 CD-ROM, which will be the same as what I have now, or it will integrate all of the fixes that have taken place in recent years? Thanks for any help on this.

    Run SFC/scannow

    File system (CFS) auditor checks that all the XP files are where they should be, and that they are not corrupt.

    WHY: You want to ensure that the base operating system files have not been damaged or changed.

    How to fix and check the integrity of the XP system files with System File Checker: SFC/scannow

    http://support.Microsoft.com/kb/310747>

    08/22 / 1104:49: 20:00 UTC

  • I get error number ox80248015 when I try to install the update from the ms window

    I get error number ox80248015 when I try to install the update from the window

    see if that covers your situation: http://support.microsoft.com/kb/896226

    Also make sure that the date and the system time is set correctly.

  • Update problems, I just reinstalled XP pro and I can't get the updates from the windows update web site

    I just reinstalled XP pro and I can't get the updates from the windows update web site. Whats up with this please help

    There is no way that anyone might be able to help without more. My initial guess and it is just a guess, is that you have to update Internet Explorer .v8. Click HERE and download IE8 and install it. Try again updates once the installation is complete.

  • When I try to download updates from the App Store, I asks me to enter my password;  However, the ID that is already stated on the box is that my wife is not mine.  When I try to change the ID I get quickly exceeded.  How can I change my username?

    I need to change the ID listed on the popup when I try to download updates from the App Store.  When I try to do as instructed, he repeatedly "expires me" in a few seconds.

    You must either update from his Apple ID or delete and re-download his Apple ID is stored inside of them.

    (138769)

  • Start Adobe Updater from the command line or a batch file

    Anyone know how to start adobe Updater from the line Commane or ideally a batch file.

    I hope it's something easy as

    "%ProgramFiles%\Adobe\Reader 9.0\Reader\AcroRd32.exe" / Update

    It is easy, but you must first find the update.  Different versions of the Adobe Reader software installed on different locations; also, there are different versions.

    On the computer I am currently using, it is located in program files Files\Adobe\Updater5 - so I have to run as

    "%programfiles%\Common Files\Adobe\Updater5\AdobeUpdater.exe"
    
  • How to install downloaded updates from the C:/Windows/Software Distribution?

    I downloaded the updates of Microsoft with a limited internet connection, but during the installation of the update, I turned off my laptop. After a google search, I find that the downloaded updates are store on "C:/Windows/Software Distribution/downloads and there are number of folders in the directory.

    But now I don't know how to install these updates downloaded from the directory. Please tell me how to deal with it because I have little internet connection and I can not afford to download again 1.7 GB of data.

    Hello Laura,

    Thanks for posting your query on the Microsoft Community.

    According to the description of problem you downloaded Windows Update but not installed at the same time and want to install in the folder C:/Windows/Software Distribution.

    I would like to inform you that the folder C:/Windows/Software Distribution just keep the entries in the updates that get downloaded or installed. We are not able to install the updates in this folder.

    However, I suggest you to check the update history and see whether or not the updates to install. According to my experience, the knowledge and conclusions, I know that if updates downloaded but then installed it after the next reboot of the computer.

    I suggest you return the item mentioned below and learn more about the Windows updates.

    Windows Update: frequently asked Questions

    Hope that the information provided is useful. Let us know if you have any concerns related to Windows. We will be more than happy to help you.

    Kind regards

  • Update from the drop-down list on the duration

    Hello, I'm fairly new to Java and Blackberry development.

    I am doing an application with a few editable text fields and drop-down lists. What I want to do is to change the options from the drop-down list (ObjectChoiceField), according to what is written on the text fields, all without pressing a button. Can someone give me a hand here? I thought to use invalidateAll to redraw the field, but I'm not sure.

    Thank you.

    OK, something else, this looks bad for me:

    your having

    unitChoiceField.setChangeListener (editListener);

    But editListener is not defined until after that, so with that statement, you're

    the listener of null changes.

    Put this line after you set your headset to changes.

    Also we say something "does not work", is not very useful.  If please do some debugging and tell us what he does not she should do this, rather than saying that it does not work.  Imagine that you took your car be fixed and told them that it did not work.  Would they be able to fix it?

  • Configuration of the AUSST. How can I easily check (Mac) computers are updated from the server AUSST?

    I installed everything according to the recipe. Video Karl Gibson watched this probably five times.

    A server

    Users have AdobeUpdate.Overwrites file in place

    Everyone's updates (couldn't than before by themselves).

    How can I easily see that updates are downloaded from the server AUSST instead of directly from Adobe online?

    I found this on my own.

    The answer lies (on mac) in the/Applications/Utilities/Console

    Look in the sidebar to download Adobe

    DML.log

    Hope this helps someone.

    22/06/14 21:32:13:409 | [INFO] |  |  |  |  |  |  | 2867720 | The download file is http://.local:80/Adobe/updates/oobe/aam20/mac/AdobeExtensionManagerCC-7.0/7.2/setup .dmg

  • Cannot turn off the field from the date of entry into application workflow

    Hello

    We implement the workflow application in OIM11g.

    We use application templates to achieve this.

    We want to disable or remove the field from the effective date in the rationale page that appears when we raise a request. Did one of you has implemented or came across this scenario. Please update if you have an idea about that.

    Thank you

    The property system will remove the entire page of the process, including the justification box.

    -Kevin

  • How can I check customers get updates from the caching Service?

    I've just set up a server 10.11 with Server.app version 5.0.15 to act as a provisioning server caching to provide updates to the clients Mac (no iOS device).

    I see that he has downloaded updates the Stats section when I chose bytes served in the drop down menu.

    I want to check that it works and that clients receive the updates of this sever when at the office.

    I did a lot of research but have not found anything definitive. I've seen suggestions may be looking at the Library/Server/Caching/Logs/Debug.log, but nothing in it can tell me whether or not a customer received an update of the caching Service. It is suggested in the Server Essentials of PeachPit book looking at Activity Monitor to check the packet network and instrumental, but which shows that the server successfully contacted Apple and checked the IP address.

    I need to know and to verify that this Service of caching works effectively by updates provided to customers on our network. Does anyone know how to do this?

    Thanks in advance.

    EDIT: I just checked the server again and downloaded only 226 MB of data. I created this yesterday afternoon. Shouldn't be much more data?

    https://help.Apple.com/ServerApp/Mac/5.0/?lang=en#/apd5E1AD52E-012B-4A41-8F21-8e 9EDA56583ALog

    LogLevel-> verbose
    I get enough information about the activities

  • How can I delete unwanted updates from the list?

    Windows 7 update list more than 35 languages to be updated.  How I removed these updates from my list of updates not installed so that I see only the coming updates to install in the future?  Whenever I open the list of updates, these 35 languages continue to flow upward.

    HOW to hide an update (or restore a hidden update)
    http://www.SevenForums.com/tutorials/24376-Windows-Update-hide-restore-hidden-updates.html ~ Robear Dyer (PA Bear) ~ MS MVP (that is to say, mail, security, Windows & Update Services) since 2002 ~ WARNING: MS MVPs represent or work for Microsoft

  • I get this error code 646 when I try to download an update from the update of the window. __

    Update of security for Microsoft Office Outlook 2007 (KB972363)

    Download size: 11.0 MB

    You may have to restart your computer for this update is taken into account.

    Update type: Important

    A vulnerability of security in Microsoft Office Outlook 2007 that could allow arbitrary code to run when a malicious web page that is updated it is open. This update resolves this vulnerability.

    More information:
    http://support.Microsoft.com/kb/972363

    Help and Support:
    http://support.Microsoft.com/?ln=en-us

    Hello

    Try this 1st to see if it helps, and it should:

    Description of the Patch registration cleanup tool
    http://support.Microsoft.com/kb/976220/

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

    If necessary :

    Try this - Panel - Windows Updates - on every update that will not be installed - click on the important updates
    or the update itself - double click a view more information (or click top then discovers on the right)

    Those who will take you to a page where you can download the update.

    Or go here and the KBxxxxxx number to download it.

    Download Center - mount the KBxxxxxx.

    Microsoft Download Center
    http://www.Microsoft.com/downloads/en/default.aspx

    Download - SAVE - go to where you put them - click on - RUN AS ADMIN

    Then you can right click on the update in the updates Windows and HIDE.

    If you get an error Installer install this version:

    Windows install 4.5 Redistributable
    http://www.Microsoft.com/downloads/details.aspx?FamilyId=5A58B56F-60B6-4412-95B9-54D056D6F9F4&displaylang=en

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

    Then run this:

    How to reset the Windows Update components? -a Mr Fixit
    http://support.Microsoft.com/kb/971058

    Description of the system for Windows Vista, Windows Server 2008, update tool and
    for Windows 7
    http://support.Microsoft.com/kb/947821

    ------------------------------------------------------------
    Because these are all Office updates you might get more information if necessary in the Agency of those groups that
    may have experienced the same problem.

    Office newsgroups
    http://www.Microsoft.com/Office/Community/en-us/FlyoutOverview.mspx

    Microsoft.public.office.misc discussions
    http://www.Microsoft.com/communities/newsgroups/list/en-us/default.aspx?DG=Microsoft.public.Office.misc&cat=en_us_01cb749f-c998-4762-8099-df71793c11c7&lang=en&CR=us

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

    If necessary you can incident free get reports however the above should take care of it for you.

    Windows updates - free Incident report

    Go here and click on-> Windows Update fails while searching, downloading or installation of updates
    http://support.Microsoft.com/GP/wusupport#tab3

    The security updates, you can get free support Incident report
    http://www.Microsoft.com/protect/resources/support.aspx

    I hope this helps.
    Rob - bicycle - Mark Twain said it is good.

  • How do we install the updates from the microsoft update catalog?

    two updates failed. KB3115311 and KB3115309 because of the unknown error.

    I downloaded them to the update of the catalogue of Microsoft

    they were .cab files. I have extracted them on my desk.

    When I double click on it, I get a message getting ready to install another gathering information. then it disappears and nothing happens. This is true with both of them. what I am doing wrong?

    Here are the updates to word 2007.

    Thank you

    Go to uninstall a program, and right click on the desktop and click on uninstall or change

    Use the Debug program.

  • Display of updates from the repository in the responses

    Hi, I edited the default repository of paint.rpd and I added in the area HS following the Oracle tutorial. After that I have a query with answers and all worked.
    Now, I removed the domain SH of the Presentation of the repository section, stop and restart the Server Server BI and OC4J but whether in IE and Firefox when I connect to OBIEE and go to the answers, I see still SH in the section area of topic, I also click on refresh metadata link but is no matter what refresh... How I update it? It is a general question, because I do not understand how I can update the metadata to display in web pages OBIEE...
    Thank you!

    I had similar problem and puzzled. I make sure the update of the RPD is copied to the Save loacation as configuration, I stop the server of the OBI and presentation Services. Then I start the server of the OBI, check the log file and make sure the correct repository file is used and all thematic areas are loaded and then start presentation Services. But I still see the old catalog of responses.

    The I got the time way is to delete a catalog of Presemtaion to the sea layer in the Server administration tool (may instead add a dummy catalogue), save it, restart the server, check the log file to ensure that the deleted topic area is not charged. So I can't see the changes. If the old subjects are loaded. I'll reboot the server once more. However, this never happen again. Once I have delete or add a catalogue of presentation. He always had saved correctly.

    I hope someone can share his knowledge/discovery why this frustrating Jules Destrooper happens.

Maybe you are looking for

  • Turn off the display of the popup volume keyboard

    Windows 7 Home Premium Pavilion Elite e9237c-b How to disable the display of pop-up the volume when adjusting it with the volume controls of the keyboard on the keyboard model KG-0851?  Although I love this feature, most of the time when running many

  • How to recover deleted Xbox live profile

    Original Titlle: my profile deleted recently xbl Hey guys, last night I had on xbl and has my account all set just perfect... Ive had my Ag3nt56 account that was my name tag gamer for at least 4 years to what I tried to make room on my hard drive...

  • Repeated RUNDLL error loading icsecpi.dll

    Hello I usually do not restart the computer daily and put it into hibernation. When I noticed a slowness in firfox browser, I restarted the computer. After reconnecting I started having this error popup every 20 seconds. He says: "Error loading c:\wi

  • Label visible only when listView is empty

    Hello I want to have a label presented in a box that disappears when an element is added to the listView. I found this example but it does not work: http://pysnippet.blogspot.de/2013/01/informative-list-views-in-Cascades-BB10.html First I discovered

  • How to make a shortcut to outlook on win7 icon

    How to create a shortcut for outlook icon the real prospects of your email on win 7 not the outlook Web site. I used Hotmail and was asked to switch to outlook that Hotmail will be gone. I'm a new user, so a response please do less technical and more