Get the row_number() when running_total reach some amount

how to Get the row_number() when running_total reach some amount?

Please take the words of RP very seriously and follow it everytime you post any question.
I'm not sure if you are asking for something like this:
ranit@XE11GR2>> with xx as
  2  (
  3     select 'a' name, 1000 sal from dual UNION ALL
  4     select 'b' name, 1500 sal from dual UNION ALL
  5     select 'c' name, 2000 sal from dual UNION ALL
  6     select 'd' name, 1500 sal from dual UNION ALL
  7     select 'e' name, 3000 sal from dual
  8  )
  9  --
10  -- "test data"
11  --
12  ,
13  x1 as
14  (
15   select
16     name, sal, SUM(sal) OVER(order by name) sm, ROW_NUMBER() OVER(order by name) rn
17   from xx
18  )
19  --
20  -- "calculated the SUM and assigned them a ROW_NUMBER"
21  --
22  select
23     name
24     , sal
25     , sm
26     , rn
27  from x1
28  where
29   sm=6000 -- "filtering based on some final amount (assumed:6000)"
30  /
N        SAL         SM         RN
d       1500       6000          4

Similar Messages

  • When I try to download Photoshop, I keep getting the message:  "We are experiencing some issues, please try again later, if the problem persists, contact Customer Support".  It's persisting.

    When I try to download Photoshop, I keep getting the message:  "We are experiencing some issues, please try again later, if the problem persists, contact Customer Support".  It's persisting.

    try now.  adobe.com just went through 24+hrs of website issues.

  • Hi! I just joined the creative cloud. As a photographer I would like to download photoshop and lightroom. When I try to do this, before the download starts, I get the message: 'we are experiencing some problems, please try later'. I've tried multiple time

    Hi! I just joined the creative cloud. As a photographer I would like to download photoshop and lightroom. When I try to do this, before the download starts, I get the message: 'we are experiencing some problems, please try later'. I've tried multiple times for the last 3 days but no change... Any ideas?

    Michelmolder please try utilizing a different web browser.  If you continue to experience difficulties then I would recommend reviewing Install and update apps - https://helpx.adobe.com/creative-cloud/help/install-apps.html for information on how to install Photoshop and Lightroom directly through the Creative Cloud Desktop application.

  • How to get the filename when parsing a file with d3l

    All
    After some time have experience with interconnect, IStudio I need the following info. Is it possible to get the filename when parsing a flat file using a d3l? This is needed because we need to store the filename together with the data into the database.
    Any examples or directions to some documents are welcome.
    Regards
    Olivier De Groef

    has anyone some info on this

  • How to get the tab when is it pressed?

    I have the following situation:
    I have an array of JTextField inside a scroollpane. The size of my array is nine or ten depends on some rules. But my window show just four JTextField. So I would like to know how to get the event when I press "tab", just to show the others JTextField while I'm pressing "tab". Because I need this event to scrooll down or scrooll up.
    I tried the keylistener, but when I press "tab" any method(keypressed, keyreleased, keytyped) is called.
    I also tried the focuslistener. If this event I could scrooll down or scrooll up, but I couldn't do both!!
    Can somebody help me??
    Thanks anyway!!
    Gin

    JTextField implements Scrollable interface, which provides information to the enclosing container such as JScrollPane.
    Hence when the tab event is fired, you can compute the Rectangle area that should be visible and then call the 'scrollRectToVisible()' method in JTextField. This will inform the JScrollPane to scroll to the rectangle that you mention.
    HTH

  • I am getting a error IO when trying to upload multiple images within wordpress using the flash uploader. I do not get the error when uploading using explorer. The error only appears if I try uploading using firefox....any ideas?

    I am getting a error IO when trying to upload multiple images within wordpress using the flash uploader. I do not get the error when uploading using explorer. The error only appears if I try uploading using firefox....any ideas?

    Logged the call with SAP who directed me to 'Define settings for attachments' in IMG and setting the 'Deactivate Java Applet' & 'Deactivate Attachment versioning' checkboxes - problem solved.

  • On my HP laptop I get the following when booting up every time: "Apple Syn Notifier-Entry Ponint Not Found.  The procedure entry point sqlite3_wal_checkpoint could not be located in the dynamic link library SQLite3.dll

    On my HP laptop I get the following when booting up every time: "Apple Syn Notifier-Entry Ponint Not Found.  The procedure entry point sqlite3_wal_checkpoint could not be located in the dynamic link library SQLite3.dll
    I have to clear this everytime I boot up?

    With that one, perhaps first try uninstalling and reinstalling your MobileMe control panel. Does that clear up the error?

  • I made a movie with iMovie and cannot get the audio when I burn into dvd. I would like to transfer video to a dvd to be played in any computer and TV

    I made a movie with iMovie and cannot get the audio when I burn into dvd. I would like to transfer video to a dvd to be played in any computer and TV

    Go to the Map mode in your iDVD project and make sure the blue bin at the left is empty.  That's where you drag slideshows to if you want the DVD to open immediately to that slideshow and bypass the menu. 
    Click to view full size
    If there is an item in there drag it out.
    OT

  • Which field ,table gets the entry when we refresh cube statistics

    Hey,
    I just want to know  into which field or table entry is made when we Refresh statistics using the manage tab of the Infocube.. I saw the fields of the table RSDCUBE , there are two includes as given below and their fields, Im noy able to quite figure out which field gets the entry when i click on refresh statistics button in the Performance tab.
    1) RSDCUBEDBFLAGS (InfoCube: DB Performance Flags): which has the following fields namely
    CLEAR_INDEX     Boolean
    DELTA_INDEX     Boolean
    REBUILD_STAT     Boolean
    DELTA_STAT     Boolean
    PERCENTAGE     internal use
    NULLCOMP     Zero elimination in the summarization module
    COMP_DISJ     Flag: only disjunct records
    REFUPDATE     No update of the non-cumulative marker
    2)RSDCUBEBWSTAT (InfoCube: BW Statistics)
    BWSTATISTICS     Boolean
    BWSTATWHM     Boolean
    However , when i click on refresh statics, there is a job which runs from my id which triggers the program RSDSTAT1 with variant as the cube name..
    its kinda urgent...  helllpp
    Thanks,
    vaish

    Hey,
    I just want to know  into which field or table entry is made when we Refresh statistics using the manage tab of the Infocube.. I saw the fields of the table RSDCUBE , there are two includes as given below and their fields, Im noy able to quite figure out which field gets the entry when i click on refresh statistics button in the Performance tab.
    1) RSDCUBEDBFLAGS (InfoCube: DB Performance Flags): which has the following fields namely
    CLEAR_INDEX     Boolean
    DELTA_INDEX     Boolean
    REBUILD_STAT     Boolean
    DELTA_STAT     Boolean
    PERCENTAGE     internal use
    NULLCOMP     Zero elimination in the summarization module
    COMP_DISJ     Flag: only disjunct records
    REFUPDATE     No update of the non-cumulative marker
    2)RSDCUBEBWSTAT (InfoCube: BW Statistics)
    BWSTATISTICS     Boolean
    BWSTATWHM     Boolean
    However , when i click on refresh statics, there is a job which runs from my id which triggers the program RSDSTAT1 with variant as the cube name..
    its kinda urgent...  helllpp
    Thanks,
    vaish

  • How to get the path when i select a directory or a file in a JTree

    How to get the path when i select a directory or a file in a JTree

    import java.lang.*;
    import java.io.*;
    import javax.swing.*;
    import javax.swing.tree.*;
    import java.awt.HeadlessException;
    import javax.swing.event.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.Iterator;
    * @author Frederic FOURGEOT
    * @version 1.0
    public class JTreeFolder extends JPanel {
    protected DefaultMutableTreeNode racine;
    JTree tree;
    protected JScrollPane scrollpane;
    final static int MAX_LEVEL = 1; // niveau max de descente "direct" dans l'arborescence
    * Sous-classe FSNode
    * @author Frederic FOURGEOT
    * @version 1.0
    private class FSNode extends DefaultMutableTreeNode {
    File file; // contient le fichier li� au noeud
    * Constructeur non visible
    private FSNode() {
    super();
    * Constructeur par initialisation
    * @param userObject Object
    FSNode(Object userObject) {
    super(userObject);
    * Constructeur par initialisation
    * @param userObject Object
    * @param newFile File
    FSNode(Object userObject, File newFile) {
    super(userObject);
    file = newFile;
    * Definit le fichier lie au noeud
    * @param newFile File
    public void setFile(File newFile) {
    file = newFile;
    * Renvoi le fichier lie au noeud
    * @return File
    public File getFile() {
    return file;
    public JTree getJTree(){
         return tree ;
    * Constructeur
    * @throws HeadlessException
    public JTreeFolder() throws HeadlessException {
    File[] drive;
    tree = new JTree();
    // cr�ation du noeud sup�rieur
    racine = new DefaultMutableTreeNode("Poste de travail");
    // cr�ation d'un noeud pour chaque lecteur
    drive = File.listRoots();
    for (int i = 0 ; i < drive.length ; i++) {
    FSNode node = new FSNode(drive, drive[i]);
    addFolder(drive[i], node); // on descend dans l'arborescence du lecteur jusqu'� MAX_LEVEL
    racine.add(node);
    // Gestion d'evenement sur JTree (on �coute les evenements TreeExpansion)
    tree.addTreeExpansionListener(new TreeExpansionListener() {
    public void treeExpanded(TreeExpansionEvent e) {
    // lorsqu'un noeud est ouvert
    // on descend dans l'arborescence du noeud jusqu'� MAX_LEVEL
    TreePath path = e.getPath();
    FSNode node = (FSNode)path.getLastPathComponent();
    addFolder(node);
    ((DefaultTreeModel)tree.getModel()).reload(node); // on recharche uniquement le noeud
    public void treeCollapsed(TreeExpansionEvent e) {
    // lorsqu'un noeud est referm�
    //RIEN
    // alimentation du JTree
    DefaultTreeModel model = new DefaultTreeModel(racine);
    tree.setModel(model);
         setLayout(null);
    // ajout du JTree au formulaire
    tree.setBounds(0, 0, 240, 290);
    scrollpane = new JScrollPane(tree);
         add(scrollpane);
         scrollpane.setBounds(0, 0, 240, 290);
    * Recuperation des sous-elements d'un repertoire
    * @param driveOrDir
    * @param node
    public void addFolder(File driveOrDir, DefaultMutableTreeNode node) {
    setCursor(new Cursor(3)); // WAIT_CURSOR est DEPRECATED
    addFolder(driveOrDir, node, 0);
    setCursor(new Cursor(0)); // DEFAULT_CURSOR est DEPRECATED
    * Recuperation des sous-elements d'un repertoire
    * (avec niveau pour r�cursivit� et arr�t sur MAX_LEVEL)
    * @param driveOrDir File
    * @param node DefaultMutableTreeNode
    * @param level int
    private void addFolder(File driveOrDir, DefaultMutableTreeNode node, int level) {
    File[] fileList;
    fileList = driveOrDir.listFiles();
    if (fileList != null) {
    sortFiles(fileList); // on tri les elements
    // on ne cherche pas plus loin que le niveau maximal d�finit
    if (level > MAX_LEVEL - 1) {return;}
    // pour chaque �l�ment
    try {
    for (int i = 0; i < fileList.length; i++) {
    // en fonction du type d'�l�ment
    if (fileList[i].isDirectory()) {
    // si c'est un r�pertoire on cr�� un nouveau noeud
    FSNode dir = new FSNode(fileList[i].getName(), fileList[i]);
    node.add(dir);
    // on recherche les �l�ments (r�cursivit�)
    addFolder(fileList[i], dir, ++level);
    if (fileList[i].isFile()) {
    // si c'est un fichier on ajoute l'�l�ment au noeud
    node.add(new FSNode(fileList[i].getName(), fileList[i]));
    catch (NullPointerException e) {
    // rien
    * Recuperation des sous-elements d'un noeud
    * @param node
    public void addFolder(FSNode node) {
    setCursor(new Cursor(3)); // WAIT_CURSOR est DEPRECATED
    for (int i = 0 ; i < node.getChildCount() ; i++) {
    addFolder(((FSNode)node.getChildAt(i)).getFile(), (FSNode)node.getChildAt(i));
    setCursor(new Cursor(0)); // DEFAULT_CURSOR est DEPRECATED
    * Tri une liste de fichier
    * @param listFile
    public void sortFiles(File[] listFile) {
    triRapide(listFile, 0, listFile.length - 1);
    * QuickSort : Partition
    * @param listFile
    * @param deb
    * @param fin
    * @return
    private int partition(File[] listFile, int deb, int fin) {
    int compt = deb;
    File pivot = listFile[deb];
    int i = deb - 1;
    int j = fin + 1;
    while (true) {
    do {
    j--;
    } while (listFile[j].getName().compareToIgnoreCase(pivot.getName()) > 0);
    do {
    i++;
    } while (listFile[i].getName().compareToIgnoreCase(pivot.getName()) < 0);
    if (i < j) {
    echanger(listFile, i, j);
    } else {
    return j;
    * Tri rapide : quick sort
    * @param listFile
    * @param deb
    * @param fin
    private void triRapide(File[] listFile, int deb, int fin) {
    if (deb < fin) {
    int positionPivot = partition(listFile, deb, fin);
    triRapide(listFile, deb, positionPivot);
    triRapide(listFile, positionPivot + 1, fin);
    * QuickSort : echanger
    * @param listFile
    * @param posa
    * @param posb
    private void echanger(File[] listFile, int posa, int posb) {
    File tmpFile = listFile[posa];
    listFile[posa] = listFile[posb];
    listFile[posb] = tmpFile;

  • How to get the link when right-clicked (for extension development)?

    Hi,
    I want to get the link when I right-click it in a page.
    I explain: when you right-click a link, you get "Open link in a new window"; this menuitem sends the link to the js function to perform an action and that's exactly what I an looking for
    Thank you

    Hi,
    If you have than one table with add_row_button then this code will work fine
    if (tableBean.getName().equals(pageContext.getParameter(SOURCE_PARAM)))
    && ADD_ROWS_EVENT.equals(pageContext.getParameter(EVENT_PARAM)))
    tableBean is Handle for your advanced table, hope it will help.
    Regards,
    Reetesh Sharma

  • How do i get the date when enter a week number

    Hi, can anyone tell me how do i get the date when enter a week number??
    let say, i enter week number 4 and year 2008
    result=26-01-2008
    thanks..

    import java.util.Calendar;
    public class testCalendar {
         public static void main(String args[]){              
              int year=2008;
              int week =5;
              Calendar now=Calendar.getInstance();
              now.set(Calendar.YEAR,year);
    now.set(Calendar.WEEK_OF_YEAR,week);
              System.out.println(now.getTime());          
    hai, anyone know why i can't get the result:27-01-2008
    i always get two day later. That is 29-01-2008
    no wonder how i change the week number and year.
    for example: week=7, year=2007
    expected result:11-02-2007
    but the result is 13-02-2007
    thanks..
    Edited by: Angel_Wei on Sep 1, 2008 11:58 PM

  • I keep getting the message when I open Muse CC, that the latest version is here and that i need to download it... But when i click "Download Latest Version" and it takes me to the applications manager it tell me that Muse is "Up to date"..... I also downl

    I keep getting the message when I open Muse CC, that the latest version is here and that i need to download it... But when i click "Download Latest Version" and it takes me to the applications manager it tell me that Muse is "Up to date"..... I also downloaded a template from Muse and it tells me when I open it that i also need the latest version... Can anyone explain why Iam getting this message and Why I can not up date?... Much appreciated

    Download the creative cloud desktop app using the below link:-
    Download Adobe Creative Cloud apps | Free Adobe CC trial
    And then check if you get install Button for Muse CC 2014.3
    Regards,
    Neha

  • Can I find the date when I transferred some files to someone else's pc?

    Hi, have a MacBook Pro but don't really know how to use it!
    I need to find out the date when I transferred some files to someone else's computer. Is there an area with some sort of history of actions where I can see what I did?
    thanks for any help
    M

    (Woggledog, I think the OP is trying to find out the date the files were copied from the Mac, not to the Mac.)
    If you are trying to determine when you transferred the files +without access to the PC that they were transferred to+, you are out of luck, I'm afraid. There's no log for that information. If you can access the PC the files were transferred to, the created/accessed dates on the PC will reflect the move. But I suspect you can't access that computer, which is why you're seeking a log of some sort...
    How did you move the files? If you used a flash drive, for example, and still have that, check there...even if the files were deleted from the drive, they may be recoverable.
    Hope this helps...

  • How come I don't get the whoosh when I send an email?

    After I installed Mavericks I don't get the whoosh when I send an email.  If I restart I'll have it until the machine goes to sleep and then it'll disappear agian.

    Note:  None is not an option in all Countries and/or Regions.
    If necessary...
    Contact iTunes Customer Service and request assistance
    Use this Link  >  Apple  Support  iTunes Store  Contact

Maybe you are looking for

  • I bought 20 new songs in the ITunes store but they are not in my IPOD after synching?

    I bought 20 new songs in the ITunes store but they are not in my IPOD after synching?

  • Unable to login: SAP System Message: Dynpro does not exist

    Hello All, I'm created a test system to practice our upgrade post steps on.  I created a pared down copy of one of our other systems.  When I try to login, I get a popup message saying: Dynpro does not exist. To create the pared down version, we used

  • MBA to VGA - Fan Problems

    Hi everyone, I have a MBA 2.13 128GB SSD. When using the MBA regularly, the fans run at about 2100-2500rpms. When I connect it to my tv through a VGA cable though, the MBA fan runs continuously at 6000rpms. Does anyone have any advice as to why its d

  • Report Query shows different result when executed manually

    Hi! When I run our report I'll get 7577 distinct rows. From here on I copied the SQL query with SQL inspector, then pasted it in Oracle SQL Developer and replaced the user variable with the same value I entered when I ran the report from within Oracl

  • Time Machine starts backup then fails

    I'm trying to use Time Machine to backup wirelessly to Time Capsule. It starts but then fails after about 40 Mb, telling me an error occurred. I've browsed these forums and tried reading Console Messages, but they don't mean much to me. This is the f