No amount of rownumber

Hi all


"How can I get the query next, row (no holes, no space) n_progress when KREG = ' 05", even if she select the two lines with the ' 05 <>', '05' and lines
in other words, even if I have 10 rows of which 7 are different from the 05 and 3 are equal ' 05 I have the numbers (n_progress) = 1,2,3,4,5,6,7

    select DISTINCT 
    case
    when KREG <> '05' then
         row_number() over (partition by K_BRANCA
      order by  CASE
         WHEN  K_ASL like '05%'  then 2
         ELSE 1
         END, K_ASL, ANNO,K_CODE   )
    when K_REGIME = '05' then    0
    end  NPROGRESS,
...
...
Thanks in advance

Vigilant Rosario wrote:
I do hope is better now

Not really...

A good habit is to give the createTable + insert or a with_clause so that we can give a try on your real problem, and not something that we imagine is your problem...
Once given these data entry of the sample, show you what output you are trying to get and give an explanation of the logic which leads to him.

On the imaginary part, maybe something in that flavor?

[11.2] Scott @ My11g > l
  1  with t (grp, id)
  2  as
  3  (
  4  select '05', 1 from dual union all
  5  select '05', 4 from dual union all
  6  select '05x', 7 from dual union all
  7  select '07', 2 from dual union all
  8  select '07z', 9 from dual
  9  )
 10  select grp, id, row_number() over (partition by substr(grp,1,2) order by id) rn
 11* from t
[11.2] Scott @ My11g > /

GRP         ID         RN
--- ---------- ----------
05           1          1
05           4          2
05x          7          3
07           2          1
07z          9          2

Tags: Database

Similar Questions

  • IPhone 5 s shows bad storage amount

    I have an iPhone 5 s with 16 GB of space. When I go to use my phone says I used about 11 GB of space, but when I add up all my apps I go 7-8 GB. My phone also displays about 500 MB free when we a few GBs. I don't know ios usea a few gigabytes, but the amount of my "used" does not. I can't use itunes for now, but I may be able to use it soon so please give an answer involving all possible outcomes with itunes.

    I plan on getting the SE Iphone soon, it will be the problem fixed when I get it, or the problem will focus on when I restore from a backup?

    Here are two articles that can help:

    https://www.igeeksblog.com/documents-and-data-iPhone/

    What is 'Other' and what I can do about it?

    A way to recover the 'other' data space is a backup/restore or more radically to give back as good as new:

    Restore your iPhone, iPad or iPod touch from a backup - Apple Support

    Use iTunes on your Mac or PC to restore your iPhone, iPad or iPod settings - Apple Support

    If you get a new iPhone, your problem should be "fixed" as you run one of the steps above.

  • I did not purchase request how the amount is deducted from my account without my knowledge

    Hello

    1. I did not purchase request how the amount is deducted from my account without my knowledge. I ask you to return the amount to my account

    2. you download the free app and I have not purchased the app, I didn't purchase was deducted without my knowledge

    3. I ask you to bring the amount in my account and I will sue you to withdraw money from my account without my knowledge

    < re-titled by host >

    Maybe it's authorization is to identify yourself, the money will be in a few days.

    Read here: on the payment card's authorization in the iTunes Store - Apple Support

  • Amount of counting dates

    Hello

    I have a spreadsheet with orders and each order date. I would like to mention the amount of orders / month using the date of order. I tried to use COUNTIF, but get 0 so all the time.

    I try to keep things simple by: COUNTIF ("" table 1-1': K; "* /" 05/2016)

    Any tips on that?

    Joost

    Hey Joost,

    Formula in B2 of the Orders table (and fill down)

    = MONTHNAME (MONTH (A2))

    In the orders by month table, column A contains the names of months in text form.

    Formula in B2 and fill down)

    = COUNTIF (Orders::B, a2)

    Kind regards

    Ian.

  • I type an e-mail; When I reached twenty lines, it won't let me nothing else in this e-mail type space... What can I do to increase the amount of text?

    Is it possible that I can increase the amount of text that is allowed when entering an email. I'm going to
    banging a long e-mail to someone and after 20 lines or more - no matter if I use spaces
    between the lines or not - even in the middle of a value - IT will appear all the words that I type...

    Sometimes, after he ceases to record what I type in an email; I can move on 8-10 lines and I can't
    type the new text that will record... but not all the time and when people read my mails, they do not realize
    the rest of my remarks in an e-mail message that are so far down the page...
    Help!
    Blessings, Judy

    Firefox send an e-mail, it's strictly a web browser.

    If you use Firefox to access your e-mail, you use "webmail". You must seek assistance from your service provider or a forum for this service.

    If your problem is with Mozilla Thunderbird, let know us and we can move this thread to the queue of Thunderbird. This issue is currently in the queue of Firefox to get answers.

  • The amount of lines of advance cuando hago con scroll configurar como el mouse?

    I have the option of "Smooth scrolling" activada como siempre the tuve. Don't Sin embargo, cada vez as quiero hacer scrolling en firefox, no avanza una determinada amount of lines, sino as lo hace of pagina en pagina, y pierdo el rastro of what iba group muy facilmente. Además el scroll is between muy rapidamente. SE introdujeron cambios en "smooth scrolling" lately? Como puedo did mi problema?

    I am using Firefox 39.0a1. En Windows 7.

    MUCHAS gracias.

    Solved:

         https://bugzilla.mozilla.org/show_bug.cgi?id=1136177
    
         Nightly 39.0a1 (2015-02-25)
    
  • I have to pay on a monthly basis this amount or once the time?

    IF I pay €0.99 for 50 GB I pay each month this amount or once?

    He charged every month until you choose to cancel the upgrade or running out of available funds; If you wish, you can use the iTunes Store Gift cards for it pay in advance.

    (143371)

  • What would be the total amount of MB or GB in the download of Firefox and Thunderbird?

    I have problems with BT as they claim I used 6.1 GB download in two days since the connection of my new Dell laptop. I was wondering how much space these two downloads require that's it, I downloaded. 6.1 GB for two programs seems a bit excessive.

    Hello, download the programs alone cannot cause this amount of traffic - the firefox configuration file is about 40 MB in size, thunderbird 25 MB...

  • How to reduce the amount of information in the box above the message text box

    When I opened an email there is a space above the text of the actual e-mail that contains a wealth of information and includes titles such as From, subject, Message ID, X-key etc. This area can be hidden from view?

    Sincere greetings,

    TREV

    You can reduce the amount of text illustrated by putting in

    Reviews | Headers of to normal. I think that yours is set on all the.

    http://www.Ramsden.org.UK/5_Lost_toolbars.html

    You can further reduce the size of the Panel itself with this add-on:

    https://addons.Mozilla.org/en-us/Thunderbird/addon/compactheader/

    http://www.Ramsden.org.UK/3_How_to_install_Add-ons_in_Thunderbird.html

  • How can I change the amount of emails display in ios9?

    How can I change the amount of emails display in ios9?

    jamesfromsherman wrote:

    How can I change the amount of emails display in ios9?

    The last iOS is no longer necessary for the former limits to be implemented since older versions of iOS where you would choose Show only recent 500, etc. You are now free to see your full Inbox. If you are using a POP account and see a bunch of messages that display as unread when you already read, you can access this mailbox on your iPhone, tap on edit and then Mark All > mark as read. Might also trash them if you wish.

  • The amount of space (memory) required for the good functioning of Firefox?

    The amount of memory required for the operation of Firefox? Trying to decide between IE and Firefox. Research in the new computer and need to think about which browser to use, and how much space it needs to work properly.

    You need no more than 40 MB for the operation of Firefox.

  • Huge downturn on a very high amount of tabs

    I just came across a problem which I'm not sure of is a problem with my computer, or a problem with Firefox, although not many are likely to be in. After that opening, about 650 tablets through 12 windows (not at the same time, he added to it after about a week of closing only not tabs) Firefox fell on massive slowdowns, where it was almost impossible to navigate through the tabs or windows or anything. My computer should still after that have about 2.5 to 3 gigabytes of RAM left in quality after subtracting the three and a half, that Firefox took at this time and normal system resources, so I don't think it's the lack of my computer, as well as other processes (background uTorrent and even a movie I tried to run) has worked well without noticeable slowdown. I wonder if Firefox has a soft limit of the amount of tabs that can be opened or if it was more likely to be the case of scripts of background running on slowing down Web pages (I get the same types of downturns if Flash player runs in a loop from a faulty script problem (, but none of the tabs had race flash and I was blocking the ads that might have jumped a flash ad). As soon as I stop 4-5 tabs that Firefox has returned to work as usual, so when I opened 5 new different those up to about 650 (+ / 2-4) the slowdown in the recovery.

    I'm a little obsessive compulsive keeping in the stuff of arm length that I might need even if it is next week so I am likely to face this again if this is the case. If Firefox did not such a problem, tell me what I should look into fixing or beefing up on my computer, such as RAM.

    If I run Firefox for a week without going out of it, it sometimes becomes very slow, but I haven't noticed any pattern to it.

    I'm not aware of a limit on the number of open tabs, either simultaneously, or during a session. But you can be almost a kind of memory limit in Firefox: it is a 32-bit application, so even if you have 8 GB of RAM, I think that 3 GB is close to the upper limit that can be used.

    Problems of memory by the way, I had another thought:

    When you browse, Firefox updates (sessionstore.js) file with information on your tabs and windows currently open and recently opened. Depending on the activity, you are, this can happen as often as every 15 seconds. Sometimes, Firefox is facing problems now this file; It can become corrupted or inflated. If your open tabs are essential to monitor, you might want to try the functionality of bookmark all tabs (right click on a tab in the window) in the case that Firefox ever grinds complete stop or the history of session file becomes unusable.

    (The session history update interval and the number of windows/tabs closed than remembered are adjustable if it seems relevant).

  • Please cancel the payment I made there is little time - 60-90 minutes, and/or credit my credit card for the amount I paid. It's more trouble than it is worth. I have

    Simply cancel the payment I made on my Visa for registration and download. It's all about confusion. I'm in no condition to continue playing with this situation. Just cancel the payment or my credit card for the amount paid. $35 + I'll just just another browser.

    Marie Heckel

    Looks like you've been scammed. Firefox is a free browser that does not require nor payment or registration. Never download from anywhere but the official site:

    Please report the offending on the following site:

    You will have to regularize the situation with the one who took your money, or failing that, with your bank or credit card company.

  • How can I reduce the amount stored?

    How can I reduce the amount stored?

    The amount is stored where? You must provide specific information about what it is you want to do.

    GB

  • Information retrieval of dead macbook pro drive without purchase mac with the same amount of disc

    I'm completely lost right now and honestly had a really bad time in the Mac store. I love Macs, the staff is usually great, but I ended up leaving enough frustrated after a few experiences of confusion with the sales guy myself.

    So, I entered the mac store with a 2011 13 inch Macbook Pro which has got water damage. It turns out that it was $750 to fix and I decided that I would just get a new one. It was the hardest or disc information you can have, and I've had about 263 on 500 or something used. I want photos and documents to browse and choose what is important.

    Then they assured me that they could extract the information and make a transfer with my computer, but I have to buy a laptop with the same amount of data - so that the Macbook Air for $1,500 instead of $1000 Macbook Air, I was going to learn how to do the transfer. They kept saying it's a case all or nothing-, they cannot choose the data from the hard drive, nor can they give it to me in a way that does not require a complete transfer of the computer and so a computer with a drive for.

    Is it possible that I can do this by a third party? Or download the information from the hard drive on something other than a full computer...?  I honestly don't need, want or have the capability of the computer with the disc like means. I just need a computer for school and would like to stick with the Mac, and the hard drive more small $1000, that's what I can afford right now.

    Thank you and sorry if it came out confused, I'm just really frustrated, I lost all my information to my own stupid mistake and cannot repair.

    p. s.

    Nothing is saved on iCloud and I don't have Time Machine.

    Remove the drive from the computer and install it in an external USB enclosure.

Maybe you are looking for

  • Music source

    I always play music and message people on Viber simultaneously, however after the update to iOS10 as soon as I press on send a message of Viber music vanishes and Viber becomes the source of music. Please let me know if there is a solution to this.

  • Restore font settings after update to Firefox on Ubuntu 14.04 35.0.1

    After the update to 35.0.1, Firefox fonts became superthin and very uncompfortable.I attach a screenshot comparison 31.2 IceCat. The fonts used are clearly the same, I see that inGIMP while zooming. And the strategy of smoothing is similar, but Firef

  • How to transfer music from Mac to my iPad

    I'm not enough smart to do I'm old 90y

  • DaisyDisk

    Nice day! As part of a diagnosis of Apple when I needed to re - index my hard drive, I ran a trial version of DaisyDisk. I have less than 200 GB used on a 500 GB hard drive spinning. Mid 2012 10.10.5 the MacBook Pro. Apple support person said that th

  • no way of knowing where my docs and photos had moved? or to undo this move?

    I moved accidentally all the docs in my download files. I do not know where they had moved to y at - there no way to know where my docs and photos had moved? or to undo this move?