Strange output wiht over

Hi
I have a table with data below. Both activity and cnt are declared as a number(20)
select *from gl_data
ACTIVITY     CNT
200710     48562
200711     43177
200712     43027
200801     43354
200802     45083
200803     43573
200804     42617
200805     43718
200806     41725
200807     41443
200808     66808
200809     40362
200810     40050
200811     42429
200812     40803
200901     40102
200902     40288
200903     41677
200904     37978
200905     38655
200906     42813
200907     38254
200908     38526
200909     54409
select activity,cnt,sum(cnt) over(order by activity desc range 1 preceding) val
from gl_data
output of this query is
ACTIVITY     CNT     VAL
200909     54409     54409
200908     38526     92935
200907     38254     76780
200906     42813     81067
200905     38655     81468
200904     37978     76633
200903     41677     79655
200902     40288     81965
200901     40102     80390
200812     40803     *40803*
200811     42429     83232
200810     40050     82479
200809     40362     80412
200808     66808     107170
200807     41443     108251
200806     41725     83168
200805     43718     85443
200804     42617     86335
200803     43573     86190
200802     45083     88656
200801     43354     88437
200712     43027     *43027*
200711     43177     86204
200710     48562     91739
Why the output is not normal for the cnt 200812 and 200712, Why it is not getting summed.
Edited by: user12152459 on Nov 3, 2009 7:54 PM

Good point - better to see things as they are rather than as one would like them to be, and we'll leave it at that.
To follow up on the first suggestion, it would have to be changed a bit if ACTIVITY is stored as DATE. Presuming a consistent value is used for the day (e.g. the 1st of the month), this should work:
select to_char(activity,'YYYYMM'),cnt,sum(cnt) over(order by activity desc range 31 preceding) val from gl_data;
Edited by: user5237783 on Nov 3, 2009 12:08 PM

Similar Messages

  • I experience strange vertical lines over the text

    I experience strange vertical lines over the text. i belive it started when i updated my firefox to it's latest version
    i tried synchronizing me clear view, but it didn't help

    it's not the display driver. it's firefox. only happens in this program and only started after F4 and doesn't happen all the time. it's a bug.

  • Help Tomcat + Apache = strange output

    my jsp website works fine under tomcat 3.2.3, when i try to use apache 1.3 as web server, everything seems ok except that some jsps generate strange output. such as:
    HTTP/1.1 200 Date: Wed, 13 Mar 2002 09:09:02 GMT Server: Apache/1.3.23 (Win32) mod_jk/1.1.0 Keep-Alive: timeout=15, max=98 Connection: Keep-Alive Transfer-Encoding: chunked Content-Type: text/html; charset=GB2312
    the http header is displayed instead of web contents. does anyone know what is the problem? by the way, the jsp uses response.sendRedirect.
    any comments is welcome, thanks in advance.

    my jsp website works fine under tomcat 3.2.3, when i
    try to use apache 1.3 as web server, everything seems
    ok except that some jsps generate strange output.
    The http header is displayed instead of web contents.
    does anyone know what is the problem? by the way, the
    jsp uses response.sendRedirect.
    any comments is welcome, thanks in advance.Hi,
    I am doing some tests on the Dwarf Server Framework (http://www.gnome.sk). A HTTP server with a servlet container is part of it too.
    I wanted to know if something that does not work under tomcat 3.2.3 would work on DWARF.
    By the way, did the good jsps use the response.sendRedirect too?
    Could you please send me a jsp page which generates the strange output?
    Thanks,
    Erika

  • How do I output widescreen over S-Video?

    I want to connect my MacBook Pro to a widescreen 16:9 TV over an S-Video cable. But when I do, the display is 4:3 stretched wide and distorted. It looks terrible!
    How do I tell the Mac that the resolution it should be providing over video out is 1280x720, or any other widescreen resolution?

    S-Video, as defined by it's standard, is a 4:3 resolution display. It outputs something like 700x436 resolution.
    There may be better options, like using a TV with a DVI connector, or getting a DVI to HDMI conversion cable if the TV has HDMI. Both of these options will be digital connections, and the MBP will automatically support the resolution of the display that's connected then.
    But -- as for S-Video, you're out of luck.
    Greg

  • Strange Output From CS3 to Fiery printers

    When we output from Indesign CS3 we get a couple of strange issues to our fiery and one new issue just started with our Harlequin RIP.
    When printing a multi page document to the Fiery's (5 Different ones) sometimes page 1 will be oriented correctly and all of the other pages will be rotated on the sheet and cut off. Also when I go to make changes through command workstation to change duplex settings, image shift etc. It's a crapshoot if it will work on Indesign files. This has been happening with all iterations of Leopard.
    When printing to the Harlequin using a preset envelope template the file is oriented wrong. It doesn't matter if we put the sizes in manually or how we set the orientation in the print window it's wrong. This has been happening for a few weeks.
    Curretly we are on 10.5.5

    Sorry I wasn't clear. The rips are the print servers. They are hooked to a variety of printers Xerox, Konica, Canon and Presstek. The problem is when I send the file and preview it at the RIP. The problems are also there when I output the files from the Rip to the printers.
    The Fiery Problem is ocuring on several different Fiery RIPS each connected to it's own printer. We only have on Harlequin RIP and Device so I'm not sure how widespread it is. The problems do not exist if I send PDF's or other native files such as quark.

  • Is it normal?(NetworkManager applet's strange output & 3 IPv6 address)

    1) label ppp0 appears in NetworkManager applet every time when I up vpn-connection
    2) Also something strange with enp5s0. Output of "ip addr":
    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default
        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
        inet 127.0.0.1/8 scope host lo
           valid_lft forever preferred_lft forever
        inet6 ::1/128 scope host
           valid_lft forever preferred_lft forever
    2: enp5s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
        link/ether 10:bf:48:20:61:a4 brd ff:ff:ff:ff:ff:ff
        inet 10.0.122.144/8 brd 10.255.255.255 scope global dynamic enp5s0
           valid_lft 9283sec preferred_lft 9283sec
        inet6 2002:5be2:8e63:b:12bf:48ff:fe20:61a4/64 scope global noprefixroute dynamic
           valid_lft 2592003sec preferred_lft 604803sec
        inet6 fec0::b:12bf:48ff:fe20:61a4/64 scope site noprefixroute dynamic
           valid_lft 2592003sec preferred_lft 604803sec
        inet6 fe80::12bf:48ff:fe20:61a4/64 scope link
           valid_lft forever preferred_lft forever
    3: wlp3s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
        link/ether 00:08:ca:67:17:e9 brd ff:ff:ff:ff:ff:ff
    9: ppp0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1400 qdisc pfifo_fast state UNKNOWN group default qlen 3
        link/ppp
        inet 91.226.141.81 peer 1.1.1.1/32 scope global ppp0
           valid_lft forever preferred_lft forever
        inet 91.226.141.81/32 brd 91.226.141.81 scope global ppp0
           valid_lft forever preferred_lft forever
    Is it normal that this interface has three IPv6 addresses?

    Hi,
    We are hitting the software bug and the bug ID is CSCsz56711
    http://tools.cisco.com/Support/BugToolKit/search/getBugDetails.do?method=fetchBugDetails&bugId=CSCsz56711
    The issue is related to PCI componenet on the AP hardware and log that points to that is..
    bsnInitRcbSlot: slot 0 has venus radio(UNSUPPORT)
    The Replacement is the resolution and please contact your reseller or partner and if ur are the partner then RMA ids the resolution..
    Lemme know if this answered ur question and please dont forget to rate the usefull posts!!
    Regards
    Surendra

  • Strange Output issue of Procedure

    Hi,
    I have a Procedure with Two Out parameter of table type. I am using DB Adapter to fetch these two out parameter. One out is for Header rows and other out is for detail rows. The strange thing is that when I test this composite using SOA server i only get data from header table but no data from detail table. My Procedure is fine when i run in SQL developer. It gives data for both tables. One another thing that i already created same composite for two other master and detail tables and that is working really fine. I tried every trick but could not get any success in this composite. Kindly help me to point out any error.
    Thanks a lot
    Nasir

    Thanks Vijay for respond..
    I am not using any transformation or Mapping. I configured a DB Adapter first. Then make a BPEL Process having input and output according to DB Adapter XSD file. then i just invoked and copied the output of procedure to output of payload.
    Thanks
    Nasir

  • Thread program: Strange output

    Hi,
    I have written a simple thread program. Previously I was trying to print hello world in the run method, the I changed it to print the value of a static data member, but strangely its still printing hello World. However if I change the print statement in the main method, it is reflected in the output but the changes to the print statement are not. Its always hello World output. I have changed the name of file, recompile it, close the shell window, restarted the computer but always the output is hello world. Can somebody help me with that. My objetive is to prove that data segment is shred in threads.
    public class Share2 extends Thread{
    static int Data=10;
       public void run ( ) {
        Data=Data+10;
         System.out.println("Data="+Data);
      public static void main (String[ ] args ) {
        First obj=new First ( );
        obj.start ( );
        System.out.println("Data ^^^^in!!! 9999main****="+Data);
    }D:\javaprogs\misc\threads>javac Share2.java
    D:\javaprogs\misc\threads>java Share2
    Data ^^^^in!!! 9999main****=10
    Hello World
    D:\javaprogs\misc\threads>javac Share2.java
    D:\javaprogs\misc\threads>java Share2
    Data ^^^^in!!! 9999main****=10
    Hello World
    D:\javaprogs\misc\threads>
    Zulfi.

    public class Share2 extends Thread{
    static int Data=10;
    public void run ( ) {
    Data=Data+10;
    System.out.println("Data="+Data);
    public static void main (String[ ] args ) {
    First obj=new First ( );<<<<< what is First? >>>>>>
    obj.start ( );
    System.out.println("Data ^^^^in!!!
    n!!! 9999main****="+Data);
    D:\javaprogs\misc\threads>javac Share2.java
    D:\javaprogs\misc\threads>java Share2
    Data ^^^^in!!! 9999main****=10
    Hello World
    D:\javaprogs\misc\threads>javac Share2.java
    D:\javaprogs\misc\threads>java Share2
    Data ^^^^in!!! 9999main****=10
    Hello World
    D:\javaprogs\misc\threads>
    Zulfi.

  • No screensaver or sleep when outputting audio over HDMI

    I am using a Mac Mini i5 2.5 running 10.8.2.  This is a new setup and I have tested it with a standard computer monitor and it works fine, however when I implement it in my home theater setup running into a Pioneer VSX-1325 receiver, which I use for my video and audio switching the screen saver will not turn on once I have played any audio over the HDMI (iTunes, Netflix... etc).  From a cold boot the screen saver will boot up, until I trigger any sustained audio (non-system sounds) through the HDMI connection... This includes web based audio as well.  Has anyone else experienced this?  For this is a major issue as this display is connected to a plasma TV and I can not rely on my wife to always use a hot corner.  I do not want any image persistence or burn-in on my display.  I should add the the screensaver function will resume after a period of time when there is no audio being output. 

    Apparently this was an issue in Lion as well.  Thread below, but can Apple fix this ASAP before I have a Plasma with burn-in?
    https://discussions.apple.com/message/21324044#21324044

  • Strange output of the PID module

    Dear all, 
    I meet a problem when using the PID module. I am only set P and use the PID as a linear gain. I found in some of my VIs , the output of the PID module is the opposite value, while in other VIs, the output is normal. In these case, I used to set the linearity of the PID as -1. Even though the VI can run normally in this way, I want to figure out what shall be the wrong about the PID module. Could you help me explain about the strange behavior about the PID module?
    Please see the attached file, I add some probes like 24 and 25 to show the values that represent this problem.
    Thanks
    best
    Attachments:
    PID module opposite output.png ‏193 KB

    Your set point is set to zero, your process variable appears to be 8.181 i.e. too high and error (SP-PV) is negative, so the output of your controller should be negative (-8.181 x Kp). The controller output is clamped to be between 0.5 and -0.5, and it is -0.5V, which is what you would expect if your Kp is the 0.1 one (I can't see which set of gains it is).
    So it appears to be correct ?
    Note: linearity should be between 0 and 1 (read the manual). Keep this set to 1 until you know things are working and only change if you need nonlinearity with error.
    Consultant Control Engineer
    www-isc-ltd.com

  • Strange output in ldif export?

    Hi. I made an export of some data in our DS today and when i look into the ldif-file I found several strange entrys. The following is an example of what I found.
    # entry-id: 8375
    dn: uid=konto1, ou=people, o=oru.se, dc=oru, dc=se
    modifyTimestamp;adcsn-405aed1600050065000d;vucsn-405aed1600050065000d: 2004031
    9125238Z
    modifiersName;adcsn-405aed1600050065000c;vucsn-405aed1600050065000c: uid=calma
    ster,ou=applications,dc=oru,dc=se
    icsCalendarOwned;adcsn-405aed1600050065000b;vucsn-405aed1600050065000b: konto1
    $Adam Adamsson
    icsSubscribed;adcsn-405aed16000500650006;vucsn-405aed16000500650006: konto1$Ad
    am Adamsson
    icsCalendar;adcsn-405aed16000500650001;vucsn-405aed16000500650001: konto1
    preferredLanguage;adcsn-405aed16000500650000;vucsn-405aed16000500650000: en
    userPassword;adcsn-405aed05000000650000;vucsn-405aed05000000650000: {SHA}4ifXl
    1K3bDstAfJkfSu6mrMBf0k=
    objectClass;adcsn-404eeebf000000650000;vucsn-404eeebf000000650000: top
    objectClass;vucsn-404eeebf000000650000: person
    objectClass;vucsn-404eeebf000000650000: organizationalPerson
    objectClass;vucsn-404eeebf000000650000: inetOrgPerson
    objectClass;vucsn-404eeebf000000650000: inetUser
    What happend with the attributenames? What is this ";vucsn-404eee......."?
    I have one master with one replica. No errors in logfiles. Using DS5.2. I hope that someone know what this is about.
    Thanks in advance/ Tomas

    Hi Chris and thank you for your answer.
    I have got a little deeper into this by now and I realise that this started after we added a replica to the system. Ldif-files made before adding the replica is clean from this 'vucsn-' information. Ldif-files made after adding the replica all contains such entries and they tend to grow over time. Here is a simple way to tell.
    master-1# grep vucsn all-suffix-2004-01-23-08.54.ldif | wc
    0 0 0
    master-1# grep vucsn all-suffix-2004-02-03-09.48.ldif | wc
    5164 10444 388512
    master-1# grep vucsn all-suffix-2004-04-04-13.28.ldif | wc
    17015 35010 1159345
    master-1# grep vucsn all-suffix-2004-04-27-13.28.ldif | wc
    31947 65721 2086786
    I have also made a test on an entry that I know is not changed since we added the replica. That entry didn't contain any strange info. After modifying an attribute on that entry, the attribute now also contain both 'vucsn-' and 'adcsn-' . I also took a look on recently added entries and they all contain this extra info on all attributes. So, my conclusion is that something happend when we added the replica. Now I just need to find out what's wrong but I dont have any idea of where to start.

  • Strange output??

    Hello,
    I am using the SAX parser to parse a xml file which can be downloaded from the http://archive.godatabase.org/latest-termdb/go_daily-termdb.obo-xml.gz.
    The file is a gene ontology. My problem is that from the 25000 terms described in this file, the parser can not read the id node of 100 of these terms correctly. The output should be like
    GO:0000142
    while it reads it as
    GO:00001
    42
    as a result what I have as the terms id is 42 . As I said this only occurs randomly in 100 terms from the 25000 terms. The characters function doesn't do anything at all
    public void characters(char[] ch, int start, int length) throws SAXException {
              tempVal = new String(ch,start,length);
         }just reads the values. Any ideas??
    ehsan

    Thanks for letting me know what was wrong. The thing is that it's so easy to fix too. just use a stringbuffer instead of the string . so the character method will look like this.
    public void characters(char[] ch, int start, int length) throws SAXException {
                    sBuff.append(ch,start,length);                
         }And tou can reset the stringBuffer at the startElement method
    public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
                   //reset the stringBuffer
                sBuff.setLength(0);     
                         }    Thanks again
    Ehsan

  • Strange output for one Vendor

    Hello to all,
    An end user has print a purchase order and there is some abnormal things on the output like payment terms conditions begin in the middle of the line but this problem is appearing only for a vendor, for all other vendors there is no problems.
    Where can we have specifications for the output of purchase order related to the vendor itself.
    Thanks in advance.
    Best regards.
    Zied.

    Hi,
    Check the output determination for the below partner functions in Vendor Master.
    OA - Ordering Address
    SP - Supplying Party
    IP  - Invoicing Party
    VN - Vendor
    Also check the NACE t-code for the Vendor / Plant / Company Code combinations for the EF (Purchase Order)
    Regards,
    Mohd Ali.

  • Strange Output of Thread

    Hi Friends
    I am getting very strange out put of the following code
    Plz explain!!!!!!!
    class BasicBlob {                                     // (1)
        static    int idCounter;
        static    int population;
        protected int blobId;
        BasicBlob() {
            blobId = idCounter++;
            ++population;
        protected void finalize() throws Throwable {      // (2)
            --population;
            super.finalize();
    class Blob extends BasicBlob {                        // (3)
        int[] fat;
        Blob(int bloatedness) {                           // (4)
            fat = new int[bloatedness];
            System.out.println(blobId + ": Hello");
        protected void finalize() throws Throwable {      // (5)
            System.out.println(blobId + ": Bye");
            super.finalize();
    public class Finalizers {
       public static void main(String[] args) {          // (6)
            int blobsRequired, blobSize;
            try {
                blobsRequired = Integer.parseInt(args[0]);
                blobSize      = Integer.parseInt(args[1]);
            } catch(IndexOutOfBoundsException e) {
                System.err.println(
                    "Usage: Finalizers <number of blobs> <blob size>");
                return;
            for (int i=0; i<=blobsRequired; ++i) {         // (7)
                new Blob(blobSize);
            System.out.println(BasicBlob.population + " blobs alive"); // (8)
       When I give the i/p 5 500000
    O/P is--------------------------
    0: Hello
    0: Bye
    1: Hello
    1: Bye
    2: Hello
    2: Bye
    3: Hello
    3: Bye
    4: Hello ////////// Why not Bye again as above 1 blobs alive
    1 blobs alive

    This has to do with whether Garbage Collector is collecting your unreferenced objects or not. In this case you are specifying a size of 500000, which from ur code is size of an array of integers (each 4 byte). so a single allocation of array corresponds to roughly 500000*4 bytes. On this size jvm heap will run out of memory for even 2 such objects and hence when it goes to create second object GC runs and your previous object is GC'ed. But for last object created this is not the case.
    U can try changing 500000 with a lesser value, say 500. All of your blobs will remain alive (if unfortunately they are not gc'ed :)).

  • Workflow Condition giving strange output

    Hello Experts,
    I am getting an strange issue in my workflow.
    Here is the condition in the workflow -
    &SWITCHDOC.SERVICEPROVIDERNEW.SERVICEPROVIDER& NE "space"  AND
    &SWITCHDOC.TARGETSUPPLYSCENARIO.VERSORGUNGSSZENARIO& NE "space"
    still i get the result false even if both the filed is filled in the container
    Can any one suggest me somthing on this issue?
    Thanks in Advance,
    Pritam

    Hi Pritam,
    whats the data type of your two parameters?
    Please check is there any default values and if it is type 'NUMC' means it has 0000 by default.
    So it can also made the conflict.
    Thanks,
    Vijay.

Maybe you are looking for

  • Photoshop CC doesn't recognize the right mouse button of my Wacom Intuos pen tablet, how do I solve this?

    For some reason photoshop CC doesn't respond to the right mouse button that is on my tablet pen. It's strange because it does work for illustrator CC, so why would photoshop CC not respond to it? Anyhow, help please! I have a wacom intuos pen tablet.

  • Text isn't displayed correctly in IE6

    Just creating a site for someone and am having a few issues with the text displaying correctly in Internet Explorer 6. I tend to create the index page and test it on most browsers out of habit to see if there are any errors. I've noticed since using

  • Elements 12 Organizer running on Windows 7 will not launch

    I have Elements 12 for over six months and it has been working fine. I have used Photo editor several times today without a problem. When I try to launch organizer either from within Editor or from the welcome screen it will not launch. It appears to

  • Class loader question

    Hi, I got NoClassDefFoundError and when I use ClasspathDebug jsp it shows that the class is loaded by "java.net.URLClassLoader". I put the jar file containing the class in <domain>/lib directory. According to docs the jar under <domain>/lib should be

  • Save report to disk

    Hello. I'm using this code to save report to disk: SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESTYPE,FILE); SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESNAME,'c:\temp\'); SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'PDF'); When there is report with