Values written with if & if else for the year

Hi all

I am facing a problem with the below mentioned script. Please suggest where I am wrong of personal watercraft

When I select yest 2010 is working well. But when I enter the data for the year 2011. It's even more written year 2010 "on data of Budget Total.

Once again, when I erase the data and run new rule shows correct figures. I'm confused, so to get the rule, I need to release twice and run three times in the planning of the data forms.

I have attached the rules in the planning of the data forms.

DIFFICULTY (Jan:Dec,"Budget","initial",@DESCENDANTS ('entity', 0), @CHILDREN("New Employees") TBH1:TBH30)

('Total employee Budget'
IF (("Year" == FY10))
'Total employee Budget' = ("Base salary" + "The additional allocation" + "Social allowance" and "Children's allowances" + "equivalency") * 12.
ElseIf (("Year" == FY11))
'Total employee Budget' = ("Base salary" + "Additional Allowancel" + "Social allowance" and "Children's allowances" + "equivalency") * 3;
ENDIF)
ENDFIX;




Concerning
Krishna

Two ways to achieve this:

FIX(Jan:Dec,"Budget","initial",@DESCENDANTS ("Entity",0),@CHILDREN("New Employees") TBH1:TBH30)

"Total Employee Budget"(
IF (@ISMBR("FY10") )
"Total Employee Budget"=("Basic Salary""Supplementary Allowance l""Social Allowance""Children Allowance""Pension")*12;
Elseif(@ISMBR("FY11"))
"Total Employee Budget"=("Basic Salary""Supplementary Allowancel""Social Allowance""Children Allowance""Pension")*3;
ENDIF)
ENDFIX;

or

FIX(Jan:Dec,"Budget","initial",@DESCENDANTS ("Entity",0),@CHILDREN("New Employees") TBH1:TBH30)
FIX("FY10")
"Total Employee Budget"(
"Total Employee Budget"=("Basic Salary""Supplementary Allowance l""Social Allowance""Children Allowance""Pension")*12;
)
ENDFIX
FIX("FY11")
"Total Employee Budget"(
"Total Employee Budget"=("Basic Salary""Supplementary Allowancel""Social Allowance""Children Allowance""Pension")*3;
)
ENDFIX

I would go for the first, because it's only a single pass through the data.

Kind regards

Cameron Lackpour

Tags: Business Intelligence

Similar Questions

  • problem with my laptop asking for the administrator password or power on password

    I have the same problem with my laptop asking for the administrator password or power on password. It is a compaq presario cq61. It happened when my hard drive failed and was not used for a long time. With the password, any help would be much appreciated. It says system turn off after a few trials with the key: 55427586

    Hello

    Try to enter: 40585508

    Kind regards

    DP - K

  • I payd with my credit card for the CC costumes... why can I only download trial versions?

    I payd with my credit card for the CC costumes... why can I only download trial versions?

    Hi APS investment.

    I checked your account and I see that you have subscribed for the creative cloud for teams in which you have a license that you have assigned to the same Adobe ID, but the invitation is still not accepted.

    In order to activate the license, please accept the invitation of your receipt for the same email, then sign on the CC from Adobe and reconnect.

    Sign in, sign out | Creative office cloud app

    Kind regards

    Sheena

  • Hi, just sign for a package monthly, received a message from the Bank that I already paid with my credit card for the first month, but I received no email / can not see the plan when I connect.

    Hi, just sign for cloud of plan monthly photoshop, has received a message from the Bank that I already paid with my credit card for the first month, but I received no email / can not see the plan when I open a session.

    There is no serial numbers for products Creative cloud,

    Sign out of Creative Cloud App and sign in the back once

    http://helpx.Adobe.com/creative-cloud/KB/sign-in-out-creative-cloud-desktop-app.html

    If the trial warning still appears, then make sure your hosts file once entries

    Log, activation, or connection errors. CS5.5 and later versions

  • Invalid value ', < user >, < cased-id >, and < module > ' for the caseId to the req parameter

    Hi all
    We sometimes get below error.
    Invalid value ', < user >, < cased-id >, and < module > ' for the in demand caseId parameter.

    What could be the cause of this error... ? I have my case id, the user and the modules case is valid.

    The application records gives following:

    ERROR com.oracle.determinations.web.platform.servlet.WebDeterminationsServletUtility - com.oracle.determinations.web.platform.exceptions.error.InvalidRequestError: invalid value ', USER1, 1-2LG5T, MODULES ' for the parameter "caseID".
    com.oracle.determinations.web.platform.exceptions.error.InvalidRequestError: invalid value ', USER1, 1-2LG5T, MODULES ' for the parameter "caseID".
    at com.oracle.determinations.web.platform.controller.SessionContext.validateRequest(SessionContext.java:575)
    at com.oracle.determinations.web.platform.servlet.WebDeterminationsServlet.doPost(WebDeterminationsServlet.java:99)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1655)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1595)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:131)
    at com.oracle.determinations.web.platform.util.CharsetFilter.doFilter(CharsetFilter.java:46)
    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77)
    at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:908)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:932)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:500)
    at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
    at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:91)
    at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:864)
    at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1583)
    at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:455)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:384)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:288)
    at com.ibm.ws.ssl.channel.impl.SSLConnectionLink.determineNextChannel(SSLConnectionLink.java:1016)
    to com.ibm.ws.ssl.channel.impl.SSLConnectionLink$ MyReadCompletedCallback.complete (SSLConnectionLink.java:639)
    to com.ibm.ws.ssl.channel.impl.SSLReadServiceContext$ SSLReadCompletedCallback.complete (SSLReadServiceContext.java:1772)
    at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
    at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
    at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
    at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
    at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
    at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
    to com.ibm.io.async.ResultHandler$ 2.run(ResultHandler.java:905)
    to com.ibm.ws.util.ThreadPool$ Worker.run (ThreadPool.java:1550)


    Thank you
    Fox

    Published by: PR on May 2, 2012 05:52

    Rajan,

    When preconfigure you a case, you must indicate the folder Siebel that you are planting prior information of. When you save a case, it is saved in the political table Automation Session, and the caseID reflects the recording of the session saved.

  • I ve been using Adobe photoshop Album 3.2 Starter edition of collection of photos with my digital camera for many years. During this time I ve got a new

    I ve been using Adobe photoshop Album 3.2 Starter edition of collection of photos with my digital camera for many years. During this time I ve got aof n new PC with Windows 7.0 and you want to pick up my photos of the past years, which were placed in separate folders of Adobe album back. I ve made my backup system from the old PC via the real picture Acronics, edition 11 program. How can I extract my Scrapbook easily back and surround him with the newly downloaded version of starter edition Adobe photo shop, easily keep the old file system?

    This product has been discontinued Photoshop elements should now be used, your Photos, you have had in Photoshop Album are normal image and always on your machine files in your backup. You must restore the albums on your disc.

  • Hi, I got my subscription for the year running last for Photoshop and Lightroom. Because I had the good idea to download the 2015 CC of Photoshop, I return to the evaluation period. I would like to know, when this period ends, will I get my subscribed v

    Hi, I got my subscription for the year running last for Photoshop and Lightroom. Because I had the good idea to download the version of Photoshop CC 2015 (I thought it was just an update...), I get to the evaluation period.

    I would like to know, when this period expires, will I get my purchased version back or should I get a new subscription?

    If I get a new subscription, one is cancelled automatically, or do I have to do something else?

    Thanks a lot for the answers!

    If you are subscribed to the creative cloud, Creative Cloud 15 updates are included.

    If when you updated, all or part of the CC apps show 'trial start or buy now' in the creative cloud desktop application, please see this link:

    https://helpx.Adobe.com/manage-account-membership/CC-reverts-to-trial.html

  • can I get 50 GB per month pour.99 but instead of monthly payments make one payment for the year?

    can I get 50 GB per month pour.99 but instead of monthly payments make one payment for the year?

    Only by buying a gift card iTunes Store and leaving enough of his balance to pay for storage.

    (138320)

  • Search for XP Dskcache.exe tool. All I can find is for the year 2000.

    Search for XP Dskcache.exe tool. All I can find is for the year 2000.

    Hello

    1. were you able to use the Dskcache.exe tool earlier?
    2. did you last changes made on your computer before this problem?
    3. which edition of windows XP you are using?

    You can see the article below which might help you.
    Get the Dskcache.exe tool to configure the Write Cache option "Power Protection.
    http://support.Microsoft.com/kb/811392

  • where can I accept the terms of microsoft for the year, indicating 19 October 2012.

    where can I accept the terms of microsoft for the year, indicating 19 October 2012.

    Where this e-mail, or any other electronic mail, is not genuine - do not click on any of the links it contains.

    - - - - - - -

    Delete this mail.

    These links in the e-mail are not the same for all recipients and thus can confirm your email address to spammers.

    Personally, I think that the email is not authentic because of these custom links.  The privacy statement online MS [one of the supposed links in the email] is actually at a fixed location for each region, such as http://privacy.microsoft.com/en-us/fullnotice.mspx

  • I have to cancel my subscription ExportPDF; I was charged for the year ahead, but I don't need.

    I have to cancel my subscription ExportPDF; I was charged for the year ahead, but I don't need.

    Go to Adobe Creative Cloud

    Hi Olga,.

    Please check the help below document:

    ICES.html https://helpx.adobe.com/x-productkb/Policy-Pricing/Cancel-subscription-Acrobat-Online-serv

    Kind regards

    Sheena

  • I just paid for adobe Creative cloud for the year, but I can't download anything, but the version track even if it is on the same adobe account and my payment went through?

    I just paid for adobe Creative cloud for the year, but I can't download anything, but the version track even if it is on the same adobe account and my payment went through?

    Hi Amy

    Refer to the applications Cloud Creative back in test mode after an update until 2015 for CC

    Thank you

    Varun

  • CHANGES for the YEAR 2010 1099 patch

    Hi all
    Someone knows the number of patch for 1099 changes for the year past (2010).
    I'm on Oracle 11i on Linux.

    Thank you
    Eugene

    check this note:

    Accounts payable plans Oracle for 2010 1099 considered [ID 209913.1]

    Version 11i - 2010 US payroll year end Phase 1 Readme [ID 1214109.1]

  • Problems with static IP setting for the port forward through 2 routers

    I currently have cable internet connected to a router (Linksys E2000 w / v1.0.03 firmware). This router is connected to another router, a Linksys E3200 with firmware v1.0.02. In order to correctly forward ports through the E3200, I understand that I need to set up a static IP address on the router.

    I almost followed the steps in this video, but when I enter all the IP addresses for the static IP address settings, it allows me to access the router configuration page. I try to get the new IP address that I gave (which he tries to move automatically once I have save settings) and the connection times out. I am able to access internet otherwise, however. From here, I have to do a factory reset on the router and start from square one.

    Anyone have any ideas? I'm quite frustrated and would like to get ports forwarded so I can get my server properly set in place.

    1. If it has connected LAN - LAN you will need to disable the DHCP server on the E3200.

    2. the best option would be to use the 'bridge' on the E3200 mode (in the latest firmware) and connect the internet port to the main router.

    3. If connected LAN - LAN (or in Bridge mode) all internet related functions on the E3200, including ports are not relevant. There is no need to set up the port on the E3200 redirects. All shipping is done only on the E2000 and nowhere else.

    4. What is the address LAN IP of the E3200? What is the address LAN IP of the E2000?

  • Need help with a query complex for the production database

    Hello again,

    I need your help once again, for a query how to show me how long each stage of production is by order.
    See examples of data and what I expect.
    Thank you all for your help.

    We use Oracle Database 11 g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production

    Here the example data tables:
    CREATE      TABLE      TABLE_2
       
    (     "ORDER_NR"      VARCHAR2 (12)
    ,      "PRIORITY"      VARCHAR2 (2)
    ,      "WO_STEP"      VARCHAR2 (1)
    ,      "STEP_DATE"      DATE
    );
    
    CREATE      TABLE      TABLE_1
    (     "ORDER_NR"           VARCHAR2     (12) PRIMARY KEY
    ,      "PRIORITY"           VARCHAR2      (2)
    ,      "CREATE_DATE"      DATE
    ,     "ACT_STEP"          VARCHAR2     (2)
    ,     "STEP_DATE"          DATE
    ,     "EMPLOYEE"          VARCHAR2     (5)
    ,     "DESCRIPTION"     VARCHAR2     (20)
    );
    
    INSERT      INTO      TABLE_1      (ORDER_NR,               PRIORITY,      CREATE_DATE,                                                        ACT_STEP,     STEP_DATE,                                                            EMPLOYEE,     DESCRIPTION) 
                        VALUES           ('1KKA1T205634',     '12',          TO_DATE('10-FEB-13 10:00:00','DD-MON-RR HH24:MI:SS'),     'U',          TO_DATE('28-FEB-13 12:00:00','DD-MON-RR HH24:MI:SS'),     'W0010',     'CLEAN HOUSE');
    INSERT      INTO      TABLE_1      (ORDER_NR,               PRIORITY,     CREATE_DATE,                                                        ACT_STEP,     STEP_DATE,                                                            EMPLOYEE,     DESCRIPTION)
                        VALUES           ('1KKA1Z300612',     '12',          TO_DATE('08-FEB-13 14:00:00','DD-MON-RR HH24:MI:SS'),     'F',          TO_DATE('20-FEB-13 16:00:00','DD-MON-RR HH24:MI:SS'),     'K0052',     'REPAIR CAR');
    
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1T205634',     '12',          'A',          TO_DATE('12-FEB-13 13:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1T205634',     '12',          '5',          TO_DATE('13-FEB-13 09:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1T205634',     '12',          'K',          TO_DATE('13-FEB-13 10:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1T205634',     '12',          '5',          TO_DATE('13-FEB-13 11:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1T205634',     '12',          'K',          TO_DATE('13-FEB-13 12:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1T205634',     '12',          '5',          TO_DATE('13-FEB-13 16:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1T205634',     '12',          'C',          TO_DATE('14-FEB-13 08:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1T205634',     '12',          'B',          TO_DATE('14-FEB-13 10:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1T205634',     '12',          'E',          TO_DATE('18-FEB-13 13:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1T205634',     '12',          'F',          TO_DATE('20-FEB-13 16:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1T205634',     '12',          'S',          TO_DATE('21-FEB-13 08:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1T205634',     '12',          'R',          TO_DATE('21-FEB-13 09:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1T205634',     '12',          'U',          TO_DATE('28-FEB-13 12:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1Z300612',     '12',          'A',          TO_DATE('12-FEB-13 13:52:42','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1Z300612',     '12',          '5',          TO_DATE('13-FEB-13 09:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1Z300612',     '12',          'K',          TO_DATE('13-FEB-13 10:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1Z300612',     '12',          '5',          TO_DATE('13-FEB-13 11:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1Z300612',     '12',          'K',          TO_DATE('13-FEB-13 12:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1Z300612',     '12',          '5',          TO_DATE('13-FEB-13 16:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1Z300612',     '12',          'C',          TO_DATE('14-FEB-13 08:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1Z300612',     '12',          'B',          TO_DATE('14-FEB-13 10:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1Z300612',     '12',          'E',          TO_DATE('18-FEB-13 13:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1Z300612',     '12',          'F',          TO_DATE('20-FEB-13 16:00:00','DD-MON-RR HH24:MI:SS'));
    COMMIT;
    And here's what I expect of my request:
    SYSDATE     28.Feb.13 14:00                                                                                     
                                                                                              
    ORDER_NR     PRIORITYCREATE_DATE     STATUS     STATUS_DATE     DESCRIPTION     AGE_1     AGE_2     WAITNG     STEP_A     STEP_B     STEP_C     STEP_5     STEP_K     STEP_E     STEP_F     STEP_S     STEP_R     
    1KKA1T205634     12     10.Feb.13 10:00     U     28.Feb.13 12:00     CLEAN HOUSE     18,083     8,833     2,125     0,833     4,125     0,083     0,750     0,208     2,125     0,666     0,042     7,125     
    1KKA1Z300612     12     08.Feb.13 14:00     F     20.Feb.13 16:00     REPAIR CAR     20,000     16,042     2,125     0,833     4,125     0,083     0,750     0,208     2,125     0,666          
    And now the explanation for the result of the query:
    The AGE_1 is the difference in days between the "CREATE_DATE" and if EXSIST L'ETAPE 'U' then STEP_DATE or if the STEP 'U' is not found in TABLE_2 then it should show the difference in days between the "CREATE_DATE' and the 'SYSDATE.
    The AGE_2 is the difference in days between the STEP "A" STEP_DATE and IF EXSIST L'ETAPE 'R' then STEP_DATE or if the STEP 'R' is not in TABLE_2 then it should show the difference in days between the "CREATE_DATE' and the 'SYSDATE.
    The EXPECTATION is the difference in days between CREATE_DATE and STEP 'A' STEP_DATE
    The following columns indicate the days, how long the ORDER_NR remains in these TIMES, if an ORDER_NR comes in the same STEP should be calculated together more than once.
    If the ORDER_NR jump a step, it should show a zero in the specific field.

    I hope that my explanation is good enough, my English skills are far from good.

    Thank you for all your help.

    Hosts Reinhard W.

    Solomon Yakobson says:
    Just add the amounts:

    In fact, you could edit all CASES:

    with t2 as (
                select  t.*,
                        lead(step_date) over(partition by order_nr order by step_date) next_step_date
                  from  table_2 t
               )
    select  t1.*,
            nvl(
                max(
                    case t2.wo_step
                      when 'U' then t2.step_date
                    end
                   ),
               sysdate
              ) - t1.create_date age_1,
            nvl(
                max(
                    case t2.wo_step
                      when 'R' then t2.step_date
                    end
                   ),
               sysdate
              ) - t1.create_date age_2,
            sum(
                case
                  when t2.wo_step in ('B','5') then t2.next_step_date - t2.step_date
                end
               ) step_b_5,
            sum(
                case t2.wo_step
                  when 'C' then t2.next_step_date - t2.step_date
                end
               ) step_c,
            sum(
                case t2.wo_step
                  when 'K' then t2.next_step_date - t2.step_date
                end
               ) step_k,
            sum(
                case t2.wo_step
                  when 'E' then t2.next_step_date - t2.step_date
                end
               ) step_e,
            sum(
                case t2.wo_step
                  when 'F' then t2.next_step_date - t2.step_date
                end
               ) step_f,
            sum(
                case t2.wo_step
                  when 'S' then t2.next_step_date - t2.step_date
                end
               ) step_s,
            sum(
                case t2.wo_step
                  when 'R' then t2.next_step_date - t2.step_date
                end
               ) step_r
      from  table_1 t1,
            t2
      where t2.order_nr = t1.order_nr
      group by t1.order_nr,
               t1.priority,
               t1.create_date,
               t1.act_step,
               t1.step_date,
               t1.employee,
               t1.description
    /
    
    ORDER_NR     PR CREATE_DA AC STEP_DATE EMPLO DESCRIPTION      AGE_1      AGE_2   STEP_B_5     STEP_C  STEP_K     STEP_E     STEP_F        STEP_S     STEP_R
    ------------ -- --------- -- --------- ----- ----------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ----------
    1KKA1T205634 12 10-FEB-13 U  28-FEB-13 W0010 CLEAN HOUSE 18.0833333 10.9583333      4.875 .083333333 .208333333      2.125 .666666667 .041666667      7.125
    1KKA1Z300612 12 08-FEB-13 F  20-FEB-13 K0052 REPAIR CAR   44.252338  44.252338      4.875 .083333333 .208333333      2.125
    
    SQL>
    

    SY.

Maybe you are looking for

  • M127FW MFP: Laser Jet MFP M127FW Pro stuck displaying "printing Page Fax: 2.

  • MAX shows no remote system tree tab

    Hi good morning all, I installed LabView 2010 and along Max on my laptop OS Visat 4.7.7. Problem that I face, is that my tree MAX 'Remote system' tab is not visible. Only my system tab is visible and its shows all software and peripherals properly. 1

  • Networking of my HP 8450 wireless using windows 7

    I am trying to configure my laptop to wirelessly access my 8450.  I've connected my printer to the router, but cannot access it.  The printer works via USB.  I use Windows 7, but any help on HP concerns W95 etc. Would appreciate help.  Thank you.

  • AMD graphics drivers do not work

    Yesterday I updated my graphic with detec amd automatic tool and drivers downloaded last available for my card (Radeon HD M 8670). Once the catalyst for the update did not work, I tried to open a game and performance was horrible. I tried removing an

  • Install W7 64 bits as an upgrade.

    I just installed W7 on a disk to upgrade to a new PC.   Now, I know that I should have my OS Vista installed first, then loaded the upgrade that it will not accept the product key.   How to do this?   Can I uninstall W7 and start again or is there an