Check and work out query based on continuity

Hi all,
My Input:
1,2,3,4,7,8,9,11,12
I need to check the continuity and break to get output as
1-4,7-9,11-12
Can i get your help how to work out this?

SQL> with t
  2  as
  3  (
  4     select '1,2,3,4,7,8,9,11,12' str from dual
  5  ), no_tbl
  6  as
  7  (
  8     select to_number(substr(str,pos1, pos2-pos1)) no
  9       from (select str,instr(str,',',1,rno)+1 pos1, instr(str,',',1,rno+1) pos2
10               from (select rownum rno, ','||t.str||',' str
11                       from t, all_objects
12                      where rownum <= NVL( LENGTH( TRANSLATE(t.str, ',1234567890',',')), 0 )+1))
13  )
14  select min(no), max (no)
15    from (select no,
16            no - row_number() over (order by no) chg
17     from no_tbl)
18   group by chg
19   order by chg
20  /
   MIN(NO)    MAX(NO)
         1          4
         7          9
        11         12

Similar Messages

  • Acrobat Pro 9 -  Subset in TouchUp Text Tool is checked and greyed out.

    Acrobat Professional version 9.1
    The Subset option in TouchUp Text Tool is checked and greyed out.
    How can this be unchecked.
    Trying to embed full fontset.
    Fonts are Arial, Arial Bold.
    [email protected]

    Hello Petros,
    I figured out how to make this work, at least on my computer.  Hold CTRL key and hit ENTER.  This leaves the space.  Hope this works for you.
    Phillip

  • The mute box is checked and grayed out so that I cannot uncheck it. How do I get my sound back?

    The mute box is checked and grayed out so that I cannot uncheck it. How do I get my sound back?

    does the sound work with headphones plugged in?  Or no sound through the external speakers or headphones?

  • "Copy files on import" checked and greyed out in elements organizer 12

    Elements organizer 12. Importing from hard-disk. Want to import without copying files, but the box "copy files on import" is checked and greyed out.
    Remains so even when selecting a fresh jpg file. (Import with copying is not a good option: eventually more than 50.000 pictures and videos are to be imported -
    I would have to delete my main media file structure in favor of adobes internal storage. Major hassle right at the start of using adobe's software..).
    What can I do ?
    (I found the same question several times on the internet, but no useable answer).

      If you are also using iPhoto; Elements will make copies to your hard drive to prevent corruption of the photo Library. The choice is Organizer or iPhoto to manage your images or you can use iPhoto together with the Elements Editor; in which case you need to set Elements as your external editor within the iPhoto settings.
     

  • Deploy to single managed server checked and greyed out while performing upgrade to EPM 11.1.2.4

    Hi Gurus,
    We are trying to upgrade EPM from 11.1.2.2 to EPM 11.1.2.4 and have applied the maintenance release successfully.
    Issue:
    When we are trying to configure EPM 11.1.2.4 and are providing the same Shared Service database details, at the summary screen, we are not able to uncheck the option "Deploy to Single Managed server" which is checked and is greyed out.
    We have tried the following:
    1. We updated the HSS_COMPONENT_PROPERTY_VALUE table  and updated the PROPERTY_NAME "isCompact" to false.
    2. Modified the config.xml file located at EPMSystem/config and epmsystem1/config to remove the property for compactState.
    We are still having the issue where we are not able to uncheck the option for Compact Deployment. Any help would be appreciated.
    Thanks in advance.

    As it is a maintenance release and it deployed as a single managed server then you will not be able to change the deployment type when applying the maintenance release.
    There is a procedure to change a deployment type from compact to single managed server that I created as an internal document.
    you may want to give it a go but you would need to test this first as this was an in house test that I carried out.
    Hyperion Planning - Version 11.1.2.2.300 and later
    Information in this document applies to any platform.
    Goal
    The scenario:
    EPM system 11.1.2.3 was configured and deployed as a single managed server compact deployment so that only one JVM was used for all products EPMServer0.
    Later on, due to performance issues, the decision was made to go for using a JVM for each product and get rid of the compact deployment.
    The administrator went ahead and redeployed the application servers individually into their own JVM.
    However everytime the webserver is reconfigured, the weblogicCluster entry in the OHS file mod_wl_ohs has 2 servers, one for EPMSserver running on port 9000 and another server running on the product default port (as if it was being load balanced)
    The aim:
    It is clear that initial compact deployment has not been cleared from the EPM environment and the aim in this exercise is to clear the registry and the file system so that the compact deployment is removed fromthe EPMenvironment and we are left with the desired configuration Single JVM deployment for earch web application.
    Solution
    Caution:
    Make sure that you take a backup of the following:
    - TheFoundation Services database schema backup
    - Take a backup of the following folders:
    \Oracle\Middleware\user_projects\FOUNDATION1\httpConfig\ohs\config\OHS\ohs_component
    \Oracle\Middleware\user_projects\domains\EPMSystem\servers
    \Oracle\Middleware\user_projects\domains\EPMSystem\config\fmwconfig\servers
    Disclaimer:
    This was tested in House and it worked for this specific environment and it may not work for your environment. So the suggestion is to test first in a development environment and make sure that you take the appropriate backups in case it does not go according to plan.
    Use at your own discretion.
    Procedure:
    1- Run the epmsys_registry to generate the Registry report
    2- Search through the report for the word applicationServerDeployment with a corresponding value of configured and take the ObjectID number down for any entry of applicationServerDeployment that has a value of Configured
    i.e:
    Instance Tasks Configuration (INSTANCE_TASKS_CONFIGURATION)
    Object ID:   e4b3a86a82c26941S32ef81a1455fe48473S7adf
    3- use the object ID of each entry you have taken down throughout the Registry HTML Report to manually set it back to Pending using the following procedure:
                    Start a command prompt and set the working directory to
                     \Oracle\Middleware\user_projects\epmsystem1\bin
                    run the command:
                     epmsys_registry.bat updateproperty #e4b3a86a82c26941S32ef81a1455fe48473S7adf/@applicationServerDeployment=Pending
                    Repeat this command for each ObjectID that has its applicationServerDeployment
                     property set to Configured
    4- rerun the epmsys_registry.bat to generate the Registry HTML report and search for applicationServerDeployment in the newly generated report to make sure that they are all set to Pending and there none missed (very Important).
    5- Search the registry HTML report this time for EPMServer0 which is the default serverName given to the single managed server deployment (there will be multiple entries)
    Take note of the first ObjectID entry in the section header: for example
    WORKSPACE_WEBAPP (WORKSPACE_WEBAPP)
    Object ID:   e4b3a86a82c26941S32ef81a1455fe48473S7bd3
    - Start a command prompt and set the working directory to
                     \Oracle\Middleware\user_projects\epmsystem1\bin
    - run the command:
                     epmsys_registry.bat view #e4b3a86a82c26941S32ef81a1455fe48473S7bd3
    -Note the Parents ID in the output:
    For example:
    Parent 1
    NAME -  WORKSPACE_LWA
    ID -  e4b3a86a82c26941S32ef81a1455fe48473S7bd0
    TYPE -  LOGICAL_WEB_APP
    Parent 2
    NAME -  HOST:BACHVMPS3TR
    ID -  e4b3a86a82c26941S32ef81a1455fe48473S7ffe
    TYPE -  HOST
    - Note the single child ID:
    For Example:
    Child 1
    NAME -  WebLogic 10
    ID -  e4b3a86a82c26941S32ef81a1455fe48473S7fd6
    TYPE -  APP_SERVER
    Now run the following command to remove the Link between Parent and child:
    epmsys_registry removelink #parentObjectID #childObjectID
    In this example that would translate to:
    To remove the single child1 link to the WORKSPACE_WEBAPP (#e4b3a86a82c26941S32ef81a1455fe48473S7bd3 ):
    epmsys_registry removelink #e4b3a86a82c26941S32ef81a1455fe48473S7bd3 #e4b3a86a82c26941S32ef81a1455fe48473S7fd6
    And do the following To remove the link between WORKSPACE_WEBAPP (#e4b3a86a82c26941S32ef81a1455fe48473S7bd3 ) and Parent1 and Parent2:
    epmsys_registry removelink #e4b3a86a82c26941S32ef81a1455fe48473S7bd0
    #e4b3a86a82c26941S32ef81a1455fe48473S7bd3
    epmsys_registry removelink #e4b3a86a82c26941S32ef81a1455fe48473S7ffe
    #e4b3a86a82c26941S32ef81a1455fe48473S7bd3
    - Now that the link has been removed, delete the WORKSPACE_WEBAPP component using its ObjectID :
    epmsys_registry deletecomponent #parentObjectID
    In this example:
    epmsys_registry deletecomponent #e4b3a86a82c26941S32ef81a1455fe48473S7bd3
    - Delete also the Parent representing the WORKSPACE_LWA
    epmsys_registry deletecomponent #e4b3a86a82c26941S32ef81a1455fe48473S7bd0
    Note:So we have now deleted the WEBAPP and LWA for workspace.
    6- Repeat steps in section No 5 for every WEBAPP with EPMServer0
    7- Start the Weblogic admin console and login
    Then go to the left panel and Expand Environment -> Server
    Click on Lock & Edit -> Select EPMServer0 -> click on Delete and confirm
    Activate Changes and Log off
    8- Stop the weblogic admin console server
    9- Go to the following location and delete the folder EPMServer0:
    \Oracle\Middleware\user_projects\domains\EPMSystem\servers
    Delete also EPMServer0 from the following location:
    \Oracle\Middleware\user_projects\domains\EPMSystem\config\fmwconfig\servers
    10- Start a command prompt and delete the Windows service that was created for EPMServer0 (if using Microsoft Windows Operating System):
    Right click on the service 'OracleHyperion EPM Server - Java Web Application (epmssystem1)' and get its service name i.e: HyS9EPMServer_FOUNDATION1
    Run the following command: sc delete HyS9EPMServer_FOUNDATION1
    11- Launch the EPMSystem configurator and redeploy the web application server to their own JVM
    12- Go to the following location \Oracle\Middleware\user_projects\FOUNDATION1\httpConfig\ohs\config\OHS\ohs_component and rename the file mod_wl_ohs.conf to mod_wl_ohs.conf.old.
    13- Copy the unconfigured mod_wl_ohs.conf file from the location C:\Oracle\Middleware\ohs\ohs\conf to the location \Oracle\Middleware\user_projects\FOUNDATION1\httpConfig\ohs\config\OHS\ohs_component
    14- Run the EPM System Configurator again and configure the WebServer to reconfigure the OHS configuration file mod_wl_ohs.conf.
    Once done then open the mod_wl_ohs.conf file and make sure that there are no servers configured with Port 9000.
    15- Start the services and test the workspace

  • I need help I have the m audio m track plus and working out of logic studio 9 and it comes up but I have no sound, but I can here it using garageband. How do I get it to work with logic studio?

    How do I use my M Audio M track Plus with the logic pro 9 software? It works with garageband, but I am not getting anything out of Logic. It does show up on list as option and I have done all of the sound preferences to M audio, etc. etc. Please help

    I got to that page but clicking on the Subscribe Free had no effect.
    Nothing showed in the Podcasts nor the iTunes U.
    In fact I also subscribed to Stanford's lectures and despite actually managing to DL them there is still no subscription in iTunes U, just the Intro to Computer Science belatedly.
    Peter
    I'd like to attach the screen grab of the out of order and randomly DLed selection of Harvard's course, but the forum won't let me attach it even though it is only 456k. Correction, close post and retry and now it lets me. NB how intermittent the DLs are and in no particular order.

  • "Export to Excel" does not work for query based on Master Data InfoSet

    We have many queries based on InfoSet consisting 2 or more PS Master Data. After we upgraded from BW 3.1 to 3.5, the "Export To Excel" function no longer works via BEx Browser. It returns all blanks where master data should be shown. Only the non-data area like column headings are exported to excel.
    Is this a bug introduced in BW 3.5?
    Thanks,
    Kinuko

    It seems that BW 3.5 SP10 may fix this problem.

  • Why oh why did developers think it's okay to automatically check AND gray out "form history" in clear recent history??

    For years I have been using clear recent history to quickly clear cookies and cache only. I had already unchecked the things I did NOT want cleared in options. But the new update automatically re-checked everything to be cleared! I did not realize this until too late, now ALL of my autocompletes are GONE! Updates should improve the function of the browser NOT change personal settings! Plus they changed options so the place to uncheck what is to be cleared is hidden and painstakingly time-consuming to find. Please do not pull this kind of "improvement" in the future, leave personal setting alone!!!!! you just ruined my night.

    kaeandcolesmon,
    If you open the recovery drive (partition) it should only have a single folder (Recovery).
    To make sure that your not saving restore points to that drive.
    See:
    Start, Control Panel, System, System Protection tab. Make sure the D drive partition is set to OFF so that it does not save there.
    I am a volunteer. I am not an HP employee.
    To say THANK YOU, press the "thumbs up symbol" to render a KUDO. Please click Accept as Solution, if your problem is solved. You can render both Solution and KUDO.
    The Law of Effect states that positive reinforcement increases the probability of a behavior being repeated. (B.F.Skinner). You toss me KUDO and/or Solution, and I perform better.
    (2) HP DV7t i7 3160QM 2.3Ghz 8GB
    HP m9200t E8400,Win7 Pro 32 bit. 4GB RAM, ASUS 550Ti 2GB, Rosewill 630W. 1T HD SATA 3Gb/s
    Custom Asus P8P67, I7-2600k, 16GB RAM, WIN7 Pro 64bit, EVGA GTX660 2GB, 750W OCZ, 1T HD SATA 6Gb/s
    Custom Asus P8Z77, I7-3770k, 16GB RAM, WIN7 Pro 64bit, EVGA GTX670 2GB, 750W OCZ, 1T HD SATA 6Gb/s
    Both Customs use Rosewill Blackhawk case.
    Printer -- HP OfficeJet Pro 8600 Plus

  • Mackeeper and daily.out log file

    This is not a question, but a tutorial garnered bits and pieces from the communtiy.
    If you have downloaded Mackeeper, you should check your daily.out file. It continues to try to run every 10 sec. even when you have trashed it (via their uninstall instructions) and will fill up that file over time. ( 10.4 gigs in my case on the daily.out log file....).
    Disclaimer note: I am using OSX 10.6.7 but this should work for most OSX systems with this bug.
    I recently found this recurring cycle.
    Fri Mar 29 06:42:29 admin-admins-power-mac-g4-3 com.apple.launchd.peruser.502[103] (com.zeobit.MacKeeper.Helper) <Warning>: Throttling respawn: Will start in 10 seconds
    Fri Mar 29 06:42:39 admin-admins-power-mac-g4-3 com.apple.launchd.peruser.502[103] (com.zeobit.MacKeeper.Helper[19883]) <Warning>: Exited with exit code: 1
    Fri Mar 29 06:42:39 admin-admins-power-mac-g4-3 com.apple.launchd.peruser.502[103] (com.zeobit.MacKeeper.Helper) <Warning>: Throttling respawn: Will start in 10 seconds
    Fri Mar 29 06:42:49 admin-admins-power-mac-g4-3 com.apple.launchd.peruser.502[103] (com.zeobit.MacKeeper.Helper[19884]) <Warning>: Exited with exit code:
    ....and could only see it happening by watching it log every 10 sec. in the Mac Console.app. (Was not registering in Activity Monitor.app). This apparently has been going on for over 2 years even though I thought I had uninstalled Mackeeper via their own instructions.
    This has the unfortunate consequence of filling up your daily.out log over time (mine was at 10.3 gigabytes after a little over 2 years... imagine infinite pages upon pages of the same stupid recurring message).
    If you have ever downloaded MacKeeper, I strongly suggest you view your daily.out log file via Console.app. You can see Mackeeper working simply by viewing “All Messeages” in Console if it’s still running... or trying to run (every 10 sec.), that is the problem, and follow carefully all the steps listed here:  http://applehelpwriter.com/2011/09/21/how-to-uninstall-mackeeper-malware/  .Use the 2nd portion of the tutorial. Do not trust that by simply dragging and dropping the app. file into trash you have gotten rid of this beast (even though Mackeeper says you can).
    Ironically, I found this anomaly using the freeware GrandPerspective (1.5.1) http://grandperspectiv.sourceforge.net/  and noticed a huge, very pretty, yet clear (not subdivided) block in the colored rectangles right away (the software was so intuitive, I simply clicked the block and then the “Reveal” button) and saw that my daily.out file (a file I didn’t even know I had) was at 10.3 gigs.
    The highlighted large light yellow area is my daily.out log file.
    (Note: you can give a donation to sourceforge.net if you think it helped you.) I find it ironic simply because I’m using freeware to free up hard disk space and speed up the computer, by getting rid of malware that claimed to do the same (Mackeeper) for a fee.
    Onward... You then need to go into terminal (something I’ve never done before... just be careful and unintimidated) and follow these instructions to delete or empty your daily.out log file. (cannot be done with a simple drag and drop to trash). I found terminal instructions for deleting (not harmful and will reconstruct) or emptying the daily.out files here: http://forums.macrumors.com/showthread.php?t=1229894
    After a try or two, this did not work for me somehow... (user error?) but this did...
    Some files are locked. In order to delete locked files, go to Apps/Utilities/Terminal, use Terminal command line :  sudo rm -rf    ...add one space after “f” then drag the file “daily.out” that grandperspective “revealed”  into the terminal, hit “return/enter” type admin. password. Hit “return” again.
    The files should delete. You will see more HD space (in my case 10.3 gigs... small these days perhaps, but can throw an almost full HD off). The daily.out log file should reconstruct on your mac’s next scheduled daily. Obviously, you should read your daily.out log file via Console.app first before delete to determine the problem.
    Hope this helps.
    (Disclaimer: I don't work for sourceforge, I am a mere musician trying to get the job done.) Thanks to all the other posters.

    Hmm. So your weekly and monthly clean-ups are running normally - I had thought there might be something wrong with them. It seems to be alot of kernel debugging entries that are making it grow so much. Did you deliberately do something to turn it on? You could try, in terminal,
    sudo rm /var/log/daily.out
    - it will ask for your admin password to confirm it. Then maybe do a system shutdown/restart to see if that kills the debugger logging. I don't know how to turn it off.

  • Query Based Taxonomy - Dynamic Creation of a Query Problem

    Hi,
    I'm trying to create new category nodes in a taxonomy and to assing them queries. I know how to do this, but I encountered a strange behavior. Here is the situation:
    I have a string property DocumentType. When manualy creating a query, it looks like:
    DocumentType CONTAINS "Some string"
    But when I do the same using code I get:
    DocumentType IS "Some string"
    And as a result of this, the taxanomy is not working properly.
    Here is the code:
         indexService =
         (IIndexService) ResourceFactory
         .getInstance()
         .getServiceFactory()
         .getService(
         IServiceTypesConst.INDEX_SERVICE);
         //        This kind of classification index offers functionality working with query based taxonomies
         qbcIndex = (IQBClassificationIndex) indexService.getIndex(indexId);
         //        Get a query folder - a query folder is a representation of a query based taxonomies category
         queryFolder = qbcIndex.getQueryFolder(RID.getRID(folder));
         //        List of IQueryEntry objects for the query folder
         queryEntryList = queryFolder.getQuery(context);
         //        Cast the IQBClassificationIndex into a ISearchIndex object
         searchIndex = (ISearchIndex) qbcIndex;
         queryEntry = searchIndex.getNewQueryEntry();
         queryEntry.setRowType(IQueryEntry.ROW_TYPE_ATTRIBUTE);
         queryEntry.setPropertyName(propertyName);
         queryEntry.setPropertyOperator(IQueryEntry.PROPERTY_OPERATOR_EQUAL);
         queryEntry.setValue(propertyValue);
         queryEntry.setTermAction(IQueryEntry.TERM_ACTION_EXACT);
         queryEntryList.add(queryEntry);
         //        Set the query for the query folder
         queryFolder.setQuery(queryEntryList, context);
         qbcIndex.updateCategoryContents("Document_Types", false, context);
    Can somebody tell me what am I doing wrong please. Isn't it because of IQueryEntry.PROPERTY_OPERATOR_EQUAL? Is there any substring operator?
    Thanks a lot.

    Hi, Robert
      In this moment, I have a problem with Query Based Taxonomy, maybe could you help me. I insert the query in to the taxonomy from code, but when i use the method
      qbcIndex.updateCategoryContents("/taxonomies/borrame5/Prueba2", false, context);
      I got the next exception:
    #1.5#0014C210F3D1002A000001200000565B000431CC93AD5979#1180654627543#System.err#sap.com/irj#System.err#dummy01#10241#####SAPEngine_Application_Thread[impl:3]_17##0#0#Error##Plain###     at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)#
    #1.5#0014C210F3D100310000012B0000565B000431CCC47166AB#1180655445698#System.err#sap.com/irj#System.err#dummy01#10241#####SAPEngine_Application_Thread[impl:3]_18##0#0#Error##Plain###com.sapportals.wcm.service.indexmanagement.IndexNotReadyException: Some documents are not included in this update because indexing has not been finished yet.#
    #1.5#0014C210F3D100310000012C0000565B000431CCC4717417#1180655445701#System.err#sap.com/irj#System.err#dummy01#10241#####SAPEngine_Application_Thread[impl:3]_18##0#0#Error##Plain###     at com.sapportals.wcm.service.indexmanagement.retrieval.trex.AbstractTrexIndex.updateCategoryContents(AbstractTrexIndex.java:2493)#
      I have doubt what parameters i need to pass to the method updateCategoryContents,
      Let me give some information:
    taxonomy:
       /taxonomies/borrame5/Prueba2
    repository:
       /documents/Portal_KOF/KM/Pruebas1/Pruebas Versionamiento
    classification and search index:
       borrame5
       I can't classify automatically, when i insert the query from code. When I manually insert the query from the portal, automatic classification run perfectly.
    Thanks
    Greetings
    JARO.

  • Query based on dynamic url paramter

    I am displaying all the results of a simple select statement on one page in an html table. One of these colums displays the unique ID of every row returned from the query. I want to make the ID field an active link, whereupon when the user clicks it, they are taken to seperate page where information for just that row is displayed. I'd imagine you have to pass the ID for that specific row to the next page via the URL, and run another query based on that specific ID to retrieve the information. I just don't know how to have the URL variable equal the ID for each row. All I can find is static examples such as 'www.gotopage.jsp?ID=1234'.

    while displaying the result in html table,
    form the href like this
    String id = resultSet.getString("ID");
    <a href="gotopage.jsp?ID=<%= id%"></a><%=id%>.......
    or post your code and we may be able to point it out.

  • Holster for Droid X while working out

    After a two-month hiatus, I'm getting back to my running and work out programs...it's been too cold.  I went on a run this afternoon and took my Droid X with me for Pandora.  Does anyone know of a good waterproof/sweatproof holster?  Maybe something like those armband types?  Or something to clip on to my pants? 
    Or is it probably a stupid idea to take this expensive device while running around town?

    gerio wrote:
    Hey, Loyd.
    Check out the Otterbox Defender line of cases. FIrst, it fits an X with the extended battery cover, which we all know was a hit with me... While it doesn't appear to be absolutely waterproof, it seems pretty close. and as I said before, it's not like building a Sherman tank around the phone, as some iPhone Otterboxes. It's actually fairly svelt for such a protective case. But as for a hollster or armaband, I don't know. You might find somehing in an online sports supply place.
    Geri O
    Thanks Geri O!  I took a look online at some supposedly waterproof/sweatproof, and some of them look like a zip top plastic bag...hmmmm...which gives me an idea...texting in the shower!  
    Seriously, does anyone take their Droid X along while working out or running?  And keep in mind, it can get really hot and humid here, and I'm a sweater...well, not like a cardigan sweater, but like a ... well, you know what I mean.

  • Using the inner query to filter outer query

    hi
    i've tried finding an old post on this, but there's nothing quite what im looking for. I have an inner query which gets sales totals, and an outer query with an outer join to return all the weeks (even when there are no sales):-
    select wk.week_id,sum(sales_total)
    from (select week, sum(sales) sales_total from tbl_sales_A
    where week between 0801 and 0807
    group by week
    UNION ALL
    select week, sum(sales) sales_total from tbl_sales_B
    where week between 0801 and 0807
    group by week)
    , tbl_weeks wk
    WHERE
    wk.week_id=week(+)
    AND wk.week_id BETWEEN 0801 AND 0807
    GROUP BY wk.week_id
    this gives me the following results:-
    week_id sales
    0801 0
    0802 0
    0803 55
    0804 66
    0805 96
    0806 0
    0807 97
    I would like my query to only return results from the first week sales are made i.e. 0803. The results would like this:-
    0803 55
    0804 66
    0805 96
    0806 0
    0807 97
    How do i write my query so that it does this???
    Many thanks for your time.
    Message was edited by:
    user645692

    On a test data:
    SQL> with test_data as (
      2    select 0801 as week_id, 0 as sales_total from dual union all
      3    select 0802, 0  from dual union all
      4    select 0803, 55  from dual union all
      5    select 0804, 60 from dual union all
      6    select 0804, 6  from dual union all
      7    select 0805, 90  from dual union all
      8    select 0805, 6  from dual union all
      9    select 0806, 0 from dual union all
    10    select 0807, 97 from dual
    11  )
    12  select week_id, sales_week_total
    13  from (
    14    select wk.week_id,sum(sales_total) as sales_week_total,
    15      sum(sum(sales_total)) over (order by wk.week_id rows between unbounded preceding and current row) as sales_so_far
    16    from test_data wk
    17    GROUP BY wk.week_id
    18  )
    19  where sales_so_far <> 0
    20  ;
       WEEK_ID SALES_WEEK_TOTAL
           803               55
           804               66
           805               96
           806                0
           807               97Regards,
    Dima
    Message was edited by:
    DimaCit

  • Working out how long a program has been run for

    i hav a server and on the stats report it makes i wanna show how long its been running for since it started
    i have a start date and time
    and a ill grab the current date and time when i run this method
    but what code would compair them and work out how long the server has actually been running for
    can i do it using these 2 days or do i need another counter thread just counting up in seconds then min then hours then days n so on ?
    Message was edited by:
    russdx

         private final static int SECOND = 1000;
         private final static int MINUTE = SECOND * 60;
         private final static int HOUR = MINUTE * 60;
         private final static int DAY = HOUR * 24;
         public static void main (String[] args)
              long time = System.currentTimeMillis();
              long days = time / DAY;
              time -= days * DAY;
              long hours = time / HOUR;
              time -= hours * HOUR;
              long minutes = time / MINUTE;
              time -= minutes * MINUTE;
              long seconds = time / SECOND;
              System.out.println (days + " days, " + hours + " hours, " + minutes + " minutes, " + seconds + " seconds");
         }Ted.

  • Working out with Ipod

    I just purchased the ipod and I am curious to know is it too big to go on the arm while running?
    Vaio   Windows XP  

    Absolutely not. I've ran and worked out with it on my arm with no problems. For convience I opted to purchase the FM tuner controler so I could skip songs if I wanted to and adjust the volume without having to dig in my pocket for the iPod or go across my chest to click the wheel.
    I was used to doing this with my PSP but it's a bit bulky to carry around for music and of course it would be a no go at the gym. My only concern was that too much movement would cause the songs to skip, but no such thing. I would recommend a case with both a strap and a belt clip just to have options. Good luck and enjoy your new iPod!

Maybe you are looking for

  • I am getting an error message when I try to burn a cd

    I am getting an eror message when I try to burn a cd of an iTunes playlist. The number that came up was 4310. Help!

  • Query for Price difference account when item is not sold but not on stock

    Hi Experts! One of my clients accountant requires a report which will help for what to do with the balance of the price difference account. At the and of the year there are some postings on this account, but not every item that hadnt been on stock wh

  • Using ICC Monitor Profiles

    Hello, I produce ICC RGB monitor profiles for use with Photoshop using an Eye One Photo. Can FCP, or other software, translate those profiles so I know my LCD monitor is displaying color and contrast accurately for editing with FCP? If not, is there

  • Possible to move 1/2 of library to ext. HD?

    Hi, My powerbook is full... I'd like to move a chunk of my music over to my external harddrive but retain my favourite stuff on the laptop for portability. I'd really rather not lose my ratings and playlists. Calling all clever people out there... an

  • Which is more powerful?

    I am thinking about purchasing a new MacBook Pro here soon which I will be using for some processor and graohics intensive stuff. I am wondering which one is more powerful, the baseline 13 inch MacBook Pro with Retina Display or the baseline MacBook