Display a Custom Sum that will Ignore Certain values

In addition to the sum that I am computing on Current Total Column in SQL Plus, I also want to do a Custom Sum on Current Total Column that will ignore certain values of the Current Total column, but displays at the same frequency as the break group. How can I do it in SQL Plus?

Hi!
I think you can use DECODE or user-defined function to create an artificial output column in your query ignoring certain values of the Current Total column and then just compute sum on it as you did on Current Total.
Regards,
Andrew Velitchko
BrainBench MVP for Developer/2000
http://www.brainbench.com

Similar Messages

  • Ignore certain values when graphing

    Hi all,
    I am currently using labview to automatically QC check data from a weather station. I have one VI that checks the incomming data for errors and outputs the data with any corrections to a text file. I have another VI that opens the text file and graphs the results. If the first VI finds a obvious error, it exchanges the bad data point with -9999 to make sure the error is obvious. Therefore, a series of temperature data may start like this: 45,45.4,800,46.5,47.3 and end up like this 45,45.4,-9999,46.5,47.3
    My question is this. Is there anyway to have labview ignore certain values when graphing. I need the auto ranging feature turned on to insure that the graphs are legible, but if the -9999 value is included it creates a problem when the scales try to incorporate it. I need to be able to set labview to graph everything but to ignore the -9999 value when determining the scale. This would create an auto-ranged graph with the -9999 value simply going off the graph.
    Tim

    You can replace the -9999 values in your array data with the double precision value NaN (Not a Number - you can actually type that into a numeric control). LabVIEW will leave an empty spot when graphing, and it won't upset your autoscaling.
    Jarrod S.
    National Instruments

  • I ordered the CS5.5 Design Premium, and InDesign will not install because, although my computer is 64 bit capable, it is currently set at 32 bit. Is there a way I can create a custom installation that will allow me to install products that require a 64 bi

    Any guidance would be greatly appreciated. I am financially impaired (nice way of saying "poor"), and cannot afford to purchase any more upgrades for my system or another version of InDesign.
    I am sure there must be settings that will allow me to install the program, possibly with limited functionality due to this issue.  I am disabled and cannot work outside of my home. I was hoping to make a small income freelancing with this package, and InDesign is a crucial part of the package.
    Thank you very much for any assistance.
    Kara Bismarck
    <email removed-kglad>

    So I would have to uninstall Windows 7 Home Premium and reinstall it as 64-bit?  I'm trying to do this without having to reformat my computer.  Is there a way I could create a 64-bit partition on my secondary hard drive without reinstalling the OS?

  • Insert a button that will paste a value from one cell to another

    I'm hoping to be able to insert a button on a form that, when clicked, will copy the values of certain cells and paste those values into other cells on the same form.
    I'm looking to insert another botton that, when clicked, will take the value in one particular cell and add 1 to the value.
    Is it possible to have one button perform both actions?

    I had add the code in my AMimpl method
    below is my code
       ViewObjectImpl vo = this.getGlJrnlHd1();
            Row newRow = vo.createRow();
            ViewObjectImpl c1 = this.getCursorC1_1();
            Row cr1 = vo.getCurrentRow();
            System.out.println ("Curretn row:"+vo.getCurrentRow());
               System.out.println (cr1.getAttribute("GrhBu"));
            newRow.setAttribute("GjhBu", cr1.getAttribute("GrhBu"));
           newRow.setAttribute("GjhPlant", cr1.getAttribute("GrhPlant"));
          newRow.setAttribute("GjhJrnlType", cr1.getAttribute("GrvlJrnlType"));
           newRow.setAttribute("GjhJrnlNo", cr1.getAttribute("GrvlJrnlNo"));
           newRow.setAttribute("GjhJrnlSfx", cr1.getAttribute("GrhJrnlSfx"));
           newRow.setAttribute("GjhJrnlDate", "Null");
           newRow.setAttribute("GjhYear", cr1.getAttribute("GrvlYear"));
           newRow.setAttribute("GjhPeriod", cr1.getAttribute("GrvlPeriod"));
           newRow.setAttribute("GjhDesc", cr1.getAttribute("GrhDesc"));
           newRow.setAttribute("GjhAppl", "GLM");
           newRow.setAttribute("GjhReversal", "N");
           newRow.setAttribute("GjhStatus","N");
           newRow.setAttribute("GjhCreBy", "NULL");
           newRow.setAttribute("GjhCreDate", "NULL");
           newRow.setAttribute("GjhUpdBy", "NULL");
           newRow.setAttribute("GjhUpdDate", "NULL");
           this.getTransaction().commit();

  • How to create a Column that will "carry over" values

    I have the first 5 colums of the following table and I would like to create the last column (Carryover). The calculation for carryover (current row) is PRIOR_DAYS_OF_SUPPLY(current row)-DAYS_BTW_REFILL(current row)-carryover (prior row)
    This is tricky since the value is dependent on the prior row value of the SAME column. I have tried the window functions but still cannot get it to work.
    P_ID     RX_DATE     DAYS_OF_SUPPLY     PRIOR_DAYS_OF_SUPPLY     DAYS_BTW_REFILL     CARRYOVER
    100     10/20/2005     30               0
    100     11/28/2005     30     30     39     0
    100     12/21/2005     30     30     23     7
    100     1/13/2006     60     30     23     14
    100     3/3/2006     30     60     49     25
    100     4/14/2006     30     30     42     13
    100     6/9/2006     30     30     56     0
    100     7/7/2006     30     30     28     2
    100     7/31/2006     30     30     24     8
    200     10/20/2005     30               0
    200     11/28/2005     30     30     30     0
    200     12/21/2005     30     30     35     0
    200     1/13/2006     60     30     25     5
    200     3/3/2006     30     60     70     0
    200     4/14/2006     45     30     32     0
    200     6/9/2006     30     45     41     4
    200     7/7/2006     30     30     30     4
    200     7/31/2006     30     30     32     2
    Any help would be greatly appreciated,
    Sam

    I may not be explaining my issue well enough. I believe that 10g has new funciontality that can solve this. Since I am in 9i, I would like to have something that does the same thing as the following 10g SQL:
    create table foo (P_ID number(3) ,R_DT date , DOS number(3) ,
    PDOS number(3), DBTWR number(3), CO number(3));
    insert into foo values (100,to_date('10/20/2005','mm/dd/yyyy'),'30',0,null,null );
    insert into foo values (100,to_date('11/28/2005','mm/dd/yyyy'),'30','30','39',0);
    insert into foo values (100,to_date('12/21/2005','mm/dd/yyyy'),'30','30','23',7);
    insert into foo values (100,to_date('01/13/2006','mm/dd/yyyy'),'60','30','23',14);
    insert into foo values (100,to_date('03/3/2006','mm/dd/yyyy'),'30','60','49',25);
    insert into foo values (100,to_date('04/14/2006','mm/dd/yyyy'),'30','30','42',13);
    insert into foo values (100,to_date('06/9/2006','mm/dd/yyyy'),'30','30','56',0);
    insert into foo values (100,to_date('07/7/2006','mm/dd/yyyy'),'30','30','28',2);
    insert into foo values (100,to_date('07/31/2006','mm/dd/yyyy'),'30','30','24',8);
    insert into foo values (200,to_date('10/20/2005','mm/dd/yyyy'),'30',0,null,null);
    insert into foo values (200,to_date('11/28/2005','mm/dd/yyyy'),'30','30','30',0);
    insert into foo values (200,to_date('12/21/2005','mm/dd/yyyy'),'30','30','35',0);
    insert into foo values (200,to_date('01/13/2006','mm/dd/yyyy'),'60','30','25',5);
    insert into foo values (200,to_date('03/3/2006','mm/dd/yyyy'),'30','60','70',0);
    insert into foo values (200,to_date('04/14/2006','mm/dd/yyyy'),'45','30','32',0);
    insert into foo values (200,to_date('06/9/2006','mm/dd/yyyy'),'30','45','41',4);
    insert into foo values (200,to_date('07/7/2006','mm/dd/yyyy'),'30','30','30',4);
    insert into foo values (200,to_date('07/31/2006','mm/dd/yyyy'),'30','30','32',2);
    ================
    Quote:
    select p_id,r_dt,dos,pdos,dbtwr,cry
    from foo
    model return all rows
    main grr
    partition by ( p_id)
    dimension by (row_number() over
    (partition by p_id order by r_dt ) as rn )
    measures (r_dt,dos,pdos,dbtwr,co, 0 as cry )
    ignore nav rules sequential order
    cry[any]= case when (pdos[cv()]-dbtwr[cv()] +cry[cv()-1])
    < 1 then 0
    else pdos[cv()]-dbtwr[cv()]+cry[cv()-1]
    end
    )

  • How to create a function that will return a value of a JComboBox PLEASEHELP

    this is my psuedo code,. but it's still not worked. Plase help..
    String vpText;
    String abc = getit();
    String s_alert[] ={"WARNIGNS","CAUTIONS","NOTES"};
    JComboBox CBweapon = new JComboBox();
    for (int i=0;i<s_weapon.length;i++) {
    CBweapon.addItem (s_weapon);
    private String getit(){
    CBweapon.addActionListener(new ActionListener (){
    public void actionPerformed(ActionEvent e){
    wpText = (String)CBweapon.getSelectedItem() ;
    return;
    return wpText;

    Maybe I'm missing some subtle point here, but why not just do this:
    private String getit(){
    return CBweapon.getSelectedItem() ;
    It doesn't make sense to me to have a method which calls actionListener like this, as if you are going to be calling it over and over again. You want to only call actionListener(...) ONE time, and every time an event is triggered, that code will be executed automatically.

  • How to do suprescript in a list that will be the value of f:selectItems ..

    I've searched this topic in the forum but didn't find what I need. So I am posting this seeking help.
    I have a SelectOneChoice dropdown. The list of choices contains something like the following. The list is constructed in my managed bean.
    1st grade
    2nd grade
    5th grade
    12th grade
    How can I make the "st, nd, th" etc. superscript in my managed bean and the superscript will still appear in the select dropdown list in my page?
    Any help is greatly appreciated.

    Frank,
    Thank you for your reply. Appreciate it very much. I'm attaching my code below. Maybe you can point me in another direction to solve my problem. Maybe I just do not understand your suggestion.
    The following is in my jsff:
    <af:selectOneChoice label="Please select a grade " id="soc1">
    <f:selectItems value="#{pageFlowScope.gradeMB.gradeList}"
    id="si1"/>
    </af:selectOneChoice>
    The following is the gradeMB. grade1, grade2 etc. are the labels for the select list.
    public List<SelectItem> getGradeList(){
    Map<Object, String> items = new HashMap<Object, String>();
    String grade1 = "<html><p>1<sup>st</sup> Grade</p></html>" ;
    String grade2 = "<html><p>2<sup>nd</sup>> Grade</p></html>"
    String grade3 = "<html><p>3<sup>rd</sup>> Grade</p></html>" ;
    String grade4 = "<html><p>4<sup>th</sup>> Grade</p></html>" ;
    items.put("1", grade1 );
    items.put("2", grade2);
    items.put("3", grade3);
    items.put("4", grade4);
    List<SelectItem> gradeToBeSelected = new ArrayList<SelectItem>();
    gradeToBeSelected = selectItemsForIterator(items);
    return gradeToBeSelected;
    private List<SelectItem> selectItemsForIterator(Map<Object, String> mapData){
    List<SelectItem> selectItems = new ArrayList<SelectItem> (mapData.size());
    Set<Map.Entry<Object, String>> set = mapData.entrySet();
    for (Map.Entry<Object, String> me :set)
    selectItems.add(new SelectItem(me.getKey(), me.getValue()));
    return selectItems;
    I was hoping that in run time it will recognize the superscript tag --> <sup>st</sup> but it didn't. It just takes the whole thing as a string.
    Thank you.
    Cecilia
    Edited by: Cecilia on Oct 31, 2010 3:11 PM
    Edited by: Cecilia on Oct 31, 2010 3:14 PM
    Edited by: Cecilia on Oct 31, 2010 3:19 PM
    Edited by: Cecilia on Oct 31, 2010 3:23 PM
    Edited by: Cecilia on Oct 31, 2010 3:42 PM

  • Making custom maps that are groups of cities

    hello guru's
    I'm looking for a method for creating new maps. In the project that we're doing now requires this map integration on a level that is not the standard city / province level.
    They want a grouping per sector which is linked to the sales person. This data is available for us so we know perfectly which entries for the city level we have to take for this grouping.
    Thanks a lot for helping us out.
    Koen Verheyen
    Belgium

    If I code a new custom component (extending JComponent, or extending the UI delegate of a standard component) and pretend it to be laf aware then I must create the corresponding UI delegate for each laf, like it happens to be with standard swing components. But I'm not sure it is feasible to create the UI delegates for all unknown existing custom lafs.You are right, this is never going to work. I suggest if you want to make your custom component look & feel aware, you design the way it displays around the l & f of other components that are part of j2se and have l&f implementations.
    http://download.oracle.com/javase/7/docs/api/javax/swing/plaf/ComponentUI.html
    There are instructions here:
    http://download.oracle.com/javase/7/docs/api/javax/swing/LookAndFeel.html
    >
    On the other side, if I create a custom laf then I will also create a custom UI delegate for each standard component, but I can not create UI delegate for all unknown existing custom components.
    The point here is that standard components and standard lafs are universally known, while custom components (or custom ui delegates) and custom lafs are not.
    So the question is: How does a swing developer deal with the case of a new custom component that will be used in an unknown custom laf?
    For instance:
    1. Custom text UI delegate for dealing with styled documents in JTextField. See {thread:id=2284487}.
    2. JTabbedPane with custom UI delegate that paints no tab if the component only contains one tab.
    In both cases I need a UI delegate for each known laf, but what happens if the application is using a laf that certainly will not be aware of this custom functionally?
    Thank you!

  • How to create dynamic stamp that will prompt for Cause number and exhibit number?

    I have a need to have a three line custom stamp that will look like the following but will allow a user to input the Cause number then the exhibit number, then successively number exhibits that the stamp is applied to:
    EXHIBIT
    12:74130
    001
    Exhibit will always be the same, but the cause number would need to be modifiable per batch possibly and I would like to be able to update the exhibit number to have a unique number on each page of exhibits....or just each exhibit.
    Can that be done?
    thanks!

    It sounds like you are trying to use a retail serial as an enterprise serial and would like to bypass it's restrictions by deactivating it . . . I assume that's not possible, but perhaps I don't understand your issue.
    I doubt you'll get a good answer on the forum. Try support, your sales rep, or a help link on the licensing web site (if there is one).
    Ben

  • Ignoring negative values at summary level

    Folks,
    I have a number of branches that have a number of customers each. I want a report at branch level (no customers detail in the report) that will ignore any negative values.
    i.e.
    Branch 1...Cust 1...10
    Branch 1...Cust 2...-20
    Branch 1...Cust 3...10
    Total Branch 1.....20
    If I have Customer in the row of the report I can achieve this with an IF formula, however I want a summary report. Have looked at aggregations on key figures and not getting anywhere.
    Any wise people who might have some ideas on how I might achieve this?
    Thanks
    Gill

    Hi,
    Branch 1...Cust 1...10
    Branch 1...Cust 2...-20
    Branch 1...Cust 3...10
    Create a formula based on Key Figure i.e. 10,-20,10 keyfigure and then write simple IF i.e. If Keyfigure <0 then 0 else value as it is.
    Then in use the summation on above formula.
    Branch 1...Cust 1...10
    Branch 1...Cust 2....0
    Branch 1...Cust 3...10
    Result = 20
    Thanks
    Reddy

  • I wanted to know if others were having difficulties getting All Day Events appear in the Notification Center in iOS 7.   Currently my Calendar in the notification center will show events that are at certain times, but they will not display All Day Events.

    I wanted to know if others were having difficulties getting All Day Events appear in the Notification Center in iOS 7.
    Currently my Calendar in the notification center will show events that are at certain times, but they will not display All Day Events.

    Have you looked at the previous discussions listed on the right side of this page under the heading "More Like This"?

  • HT1766 yesterday i connect my iPhone with iTunes then one MSG displayed on screen about backup i ignore that but same time i have lost all my installed app from my iPhone pls help me.

    yesterday i connect my iPhone with iTunes then one MSG displayed on screen about backup i ignore that but same time i have lost all my installed apps incouled my pics and vids from my iPhone pls help me.

    1) ensure iTunes is authorized for your iTunes store account(s)
    2) connect your device and right-click or control-click it in the iTunes Source list, then choose transfer purchases from the shortcut menu that appears.
    3) sync the device
    iTunes will wipe the iPhone but, since you transferred your purchases in the previous step, your content will be in your library and you can re-populate the iPhone with it.
    above works for purchases from the iTunes store. for everything else, check out this post by Zevoneer.

  • Settings in Query Designer that will display eact and every record

    Hi,
    First Name and Last Name are the (navigational) Attributes of an Employee_ID
    I a query user may use either Employee ID or Employee First Name or Employee Last Name
    Issue:
    If user uses Emp_ID it is displaying 100 Employees
    If the user Uses Employee First Name then it is displaying 93 Employees it is not displaying 7 employees because 7 of them got the same First Name
    Simillarly for Last Name as well
    How can i make a setting that will display every individual  record of an employee
    Thanks

    Hi,
    The reason why i am using First & last Name is as the users want First & Last name of an employee in drilldown and need to sork on either according to their requirment........
    I am not load any text data for Emp _ID
    the name based selection will not have uniqueness, only possible way is use the processing type as customer exit to chk all the records from the master data table and to display
    Could you please explain me in detail on Customer Exit option
    Thanks

  • I play KOC on fb and everytime I refresh I get this: To display this page, Firefox must send information that will repeat any action (such as a search or order confirmation) that was performed earlier. What can I do to fix this?

    When playing my fb game KoC I need to refresh a lot and every time I do I get this message: To display this page, Firefox must send information that will repeat any action (such as a search or order confirmation) that was performed earlier. How can I disable this message?

    Just give us a means of opting out if we don't care about POST data; or opting out for certain web sites. We have an application that I use hundreds of times a day at work and as a result, I get that message hundreds of times. Opening new tabs doesn't help because I'd have to open numerous tabs, and then it takes time to figure out which tab is the "back" tab.

  • Hello, I am trying to use a photo,that I've opened up in pages on a blank landscape, taken from my camera roll and use it as album cover art. All the custom text's will not paste when I copy.  Pic and texts are saved as a PDF, how can I paste the doc ?

    Hello, I am trying to use a photo,that I've opened up in pages on a blank landscape, taken from my camera roll and use it as album cover art. All the custom text's will not paste when I copy.  Pic and texts are saved as a PDF, how can I paste the doc ?

    Hello, I am trying to use a photo,that I've opened up in pages on a blank landscape, taken from my camera roll and use it as album cover art. All the custom text's will not paste when I copy.  Pic and texts are saved as a PDF, how can I paste the doc ?

Maybe you are looking for

  • Users Cannot login to Network Accounts

    Hello, I have a newly built server, Mountain Lion, but am having issues with my users logging in; an error is received. I have not made the server Live Because of this issue of course. The Users Home folders are on a different external Hard Drive att

  • CJR2 entries in version 0 (original) and EFC (copy) show different ? amount

    HI Team, Recently we copied data from Version O to Version EFC using T code CJ9F , When running CJ9F to copy V0 to EFC, the work centre rate has updated in Version EFC with the latest from Version  0 , Therefore, the CJR2 entries in version 0 (origin

  • How can I filter alerts shown in the Server app?

    In the time I've been running OS X Mavericks Server, the only alert to come up in the Server app's Alerts pane is "Virus detected in inbound email". That's about as surprising as finding that water is wet, so I'd like not to see those alerts. I don't

  • Studio 12: dbx: internal error: signal SIGSEGV (no mapping at the fault add

    $dbx /usr/bin/dbx /tmp/core For information about new features see `help changes' To remove this message, put `dbxenv suppress_startup_message 7.6' in your .dbxrc Reading dbx core file header read successfully Reading ld.so.1 Reading libintl.so.1 Rea

  • Errors solman_setup initial configuration in StartSLD Configuration step

    Getting an authentication error when trying to sign into SAP netWeaver using the solman_admin account created in the first step of the initial configuration.  I tried going back and creating another user and setting a new password but am still gettin