How to consolidate rows of data based on a single column?

I have a large amount of data that is currently formatted like this:
18 - 2 - 0 - 0 - 0 - 0 - 0 - 0 - 0
18 - 0 - 4 - 0 - 0 - 0 - 0 - 0 - 0
18 - 0 - 0 - 5 - 0 - 0 - 0 - 0 - 0
19 - 0 - 2 - 0 - 0 - 0 - 0 - 0 - 0
19 - 0 - 0 - 0 - 5 - 0 - 0 - 0 - 0
20 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0
20 - 0 - 0 - 0 - 0 - 0 - 3 - 0 - 0
20 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 2
I would like to sort it all based on the value in first column. Currently, each row has only 2 (non-zero)
values. The first in column A, and another in only ONE of the other columns. I want to consolidate the rows according to the value in column A. The final product should look like this:
18 - 2 - 4 - 5 - 0 - 0 - 0 - 0 - 0
19 - 0 - 2 - 0 - 5 - 0 - 0 - 0 - 0
20 - 1 - 0 - 0 - 0 - 0 - 3 - 0 - 2
How can I go about doing this?
Thanks in advance

Use advanced data filters to create a unique list based on column A in another range, then use SUMIF formulas keyed to those values to sum the other columns.
Or use a pivot table, with column A as the row field, and the others as data , each set to sum. and then drag the data button to the column field area.

Similar Messages

  • JTable: HOW TO INSERT ROWS AND DATA?

    I have one JFrame on screen and inside of this i have a JTable, the question is how to insert rows and data into the JTable?

    [http://java.sun.com/docs/books/tutorial/uiswing/components/table.html]
    In future, please post Swing questions to the [Swing Forum.|http://forums.sun.com/forum.jspa?forumID=57]
    In short, your TableModel is probably a DefaultTableModel . Study its API.

  • How to calculate Goods issue date based on the time of delivery

    Hi SAP Gurus,
    I seek your help/suggestion for the given scenario.
    The user requires calculating the GI date based on time of delivery.
    Based on the delivery priority (like Priority 1= Day 1, Priority 2= Day 2) maintained in customer master, the need is something like below-
    1st case= If Retail Customeru2019s delivery orders received before midday (Noon cut off) require to be dispatched on same working day (Day 1)
    Wholesaler customer delivery orders received before midday require to be dispatched by the next
    Working day (Day 2 Including day of receipt)
    2nd case= Retail customeru2019s delivery orders received after midday require to be dispatched by the next working day
    Wholesaler customer delivery orders received after midday require to be dispatched by on day 3
    Kindly suggest , how to proceed in this. I am new to SAP world so need ur help to tackle this.
    Thanks a lot in advance for the valuable inputs.

    What I proposed to do was,
    a. Create routes like 0 day route, 1 Day route, 2 day route etc.
    b. Route determination is based on the Shipping condition of the customer. Put in the shipping condition for the customer as 00 - immediate delivery. 01 - By Truck, 02 - By Rail, 03 - Ship etc
    c. Now, put in your route determination in such a way that routes change in the sales order with shipping condition (SC). Like, if the shipping condition is set to 00, then 0 day route comes up. Meaning immediate delivery, if SC is 01, then your normal route by truck picks up. etc.
    When the sales order is manually created, you know the time of creation. As route is one of the criteria, the material confirmation happens based on number of days you put in the route to reach the destination. Now that you have the material available for today's delivery, the delivery program can be run to create it, or it can be manually created.
    Now, when you configure the route you have to specify 'Transit duration in calendar days'.
    When you have the sales order created electronically (say thru EDI), then, you may have to ask them to send in shipping condition. Else, you have to modify the function module Idoc_input_orders in such a way that if the sales order creation time is < 12 PM, then put shipping condition as 00, else copy what ever is there in the customer.
    If you do not want to check the time manually when the user creates the sales order, then you may have to use the user exit MV45AFZZ (and I think you can use Save_order_prepare) to check the time and change the shipping condition. By this you will avoid extra coding in Idoc_input_orders and also need not bother if the user changed the route or not.
    Hope my explanation helps.
    Regards,
    Mukund S

  • How to display rows of data in JSP?

    Hi,
    I am learning Servlet and JSP. There is an exercise which requires us to access a database from a Servlet and display the retrieved data in a JSP.
    Now I am ok with the database connection. So how to display the data using some kind of loop?
    Regards

    They're called ResultSets and they are returned when you execute a query from a Statement. The next() method will tell you whether or not you have another row of data to read.

  • How to hide rows without data or all zero?

    Hi.experts:
        I have define a query that using query designer,and I have defined structure for both row and column,and then I have a free chatacteristic,such as 0MATERIAL,if I navigate by material then in each row,the material looks like read all the master data and displayed in the result area.
         How can  I hide these row without data.(or to say all with zero).where to using supress zero etc to avoid this?
         Your quick response is highly appreciated!!Thanks in advance.
    Best Regards
    Martin Xie

    Hi,
    you have the option of suppress zeroes in the properties of the queries where you can give the option whether you want to supress the rows or columns as well which conatains zeroes.
    Thanks
    Ajeet

  • How to display rows of data into different columns?

    I'm new to SQL and currently this is what I'm trying to do: 
    Display multiple rows of data into different columns within the same row
    I have a table like this:
        CREATE TABLE TRIPLEG(
            T#              NUMBER(10)      NOT NULL,
            LEG#            NUMBER(2)       NOT NULL,
            DEPARTURE       VARCHAR(30)     NOT NULL,
            DESTINATION     VARCHAR(30)     NOT NULL,
            CONSTRAINT TRIPLEG_PKEY PRIMARY KEY (T#, LEG#),
            CONSTRAINT TRIPLEG_UNIQUE UNIQUE(T#, DEPARTURE, DESTINATION),
            CONSTRAINT TRIPLEG_FKEY1 FOREIGN KEY (T#) REFERENCES TRIP(T#) );
        INSERT INTO TRIPLEG VALUES( 1, 1, 'Sydney', 'Melbourne');
        INSERT INTO TRIPLEG VALUES( 1, 2, 'Melbourne', 'Adelaide');
    The result should be something like this:
    > T#  | ORIGIN  | DESTINATION1  |  DESTINATION2 
    > 1   | SYDNEY  | MELBORUNE     | ADELAIDE
    The query should include the `COUNT(T#) < 3` since I only need to display the records less than 3. How can I achieve the results that I want using relational views???
    Thanks!!!

    T#
    LEG#
    DEPARTURE
    DESTINATION
    1
    1
    Sydney
    Melbourne
    1
    2
    Melbourne
    Adelaide
    1
    3
    Adelaide
    India
    1
    4
    India
    Dubai
    2
    1
    India
    UAE
    2
    2
    UAE
    Germany
    2
    3
    Germany
    USA
    On 11gr2, you may use this :
      SELECT t#,
             REGEXP_REPLACE (
                LISTAGG (departure || '->' || destination, ' ')
                   WITHIN GROUP (ORDER BY t#, leg#),
                '([^ ]+) \1+',
                '\1')
        FROM tripleg
        where leg#<=3
    GROUP BY t#;
    Output:
    1 Sydney->Melbourne->Adelaide->India
    2 India->UAE->Germany->USA
    Cheers,
    Manik.

  • How can I display the data in table in separate column?

    I have a vi reading data one by one in the same column.
    How can I display the data with separate column?
    like this:
    data 1 | read | read
    data 2 | read | read
    data 3 | read | read
    (would you mind if I will ask for an example
    because it is much easier for me to work
    with an example)
    THANK YOU.

    If you're reading your data in as a 1D array, this is as simple as using the Reshape Array to make a 2D array. I've attached an example in LabVIEW 6.1 format. The example rearranges a single column of data fill several columns horizontally, but you can easily modify this code to fill the columns downward instead.
    Attachments:
    Data_Column_Example.vi ‏18 KB

  • How to consolidate conutry specific forms in to a single form

    Hello,
    I have a requirement where I have to consolidate the country specific forms into a single form. Have country specific forms like France has its own form and US has its own form. How to consolidate these forms into a single form? What is the process?
    I appreciate your responses.
    Thanks,
    mp

    Hello,
    you can use the following way to include different languages.
    Create the Text elements in different languages.
    Then you can call them in your script by giving the language parameter.
    For example:- I have created a text object as ZHEX-MACRO-4MARKEN and then called with language parameter as below.
    INCLUDE ZHEX-MACRO-4MARKEN OBJECT TEXT ID ST LANGUAGE EN
    Thanks,
    Manish

  • Multi row portal form based on a single table or view

    Hi,
    I have to create a multi row (tabular format) portal form based on a single table. Please help.
    Thanks

    Hi,
    A workaround to create multi row for based on single table has been discussed in the following :
    http://forums.oracle.com/forums/message.jsp?id=469778
    Thanks
    Vineet

  • How to get two tansaction data's in a single table.

    hi experts,
                   I have 2 transaction data's:
    Eg:
    Transaction data 1: 
    ID       C1      C2     C3
    101     10      20      30
    102     11      21      31
    103     12      22      32
    Transaction data 2:
    ID       C1      C4     C5
    101     10      40      50
    102     11      41      51
    103     12      42      52
    my question is, when i am trying to loading the data into the infocube, i should get both data's in a single table. that means it should be like:
    ID    C1  C2   C3   C4   C5
    101  10   20    30   40   50
    102  11   21    31   41   51
    103  12   22    32   42   52
    Note:  C1 object contains same data in both trandata's

    Venkata,
    In this case you should first load to ODS and then to Infocube. But both the data should have common key fields. Data fields can vary.
    In your case suppoe ID be the key field. Both the dat should have ID, as the ODS will have ID as key field.
    Now you can have two infosources and two update rules to the same ODS.
    So the ODS strcuture will be:
    ID C1 C2 C3 C4, C5
    First data and second data as you gave. But the C1 in second dat should have an extra field as it will be overwritten if it is not a key field and will add a new record if the value of C1 is not same as that of data1.
    First decide upon teh key fields of ODS. In update rules you can map only required fields from the respective tran data only. Like in first update rules you can map ID C1, C2, C3 only and in second you can map ID C4, C5. Now we need to evaluate only C1 for which I need some sample records and data relation
    By this way you can get a single record in ODS after loading both data.

  • How to display two or more links in a single column

    Hi,
    Is there a way to display two links in a single column in a sql query report . I am able to specify one but I am not able to add links to the same column . I want to take the same column id and redirect the user to different pages based on the values selected .
    Thanks

    There is no way to this declaratively that I know of. Some alternatives...
    1. Put the conditional branching logic in the report SQL itself. e.g. case when ... then '< a href=..' else '< a href=...' end and make sure the column display type is Standard Report column
    2. Have the declarative column link go to a dummy/intermediate page and setup On Load: Before-Header branches on that page to redirect to the desired page based on the item value(s) passed in to the intermediate page.

  • HOW TO FIND LAST DOCUMENT DATE BASED ON MATERIAL NUMBER

    Hi,
           I want to know how to find the last document details based on material number.
    Is there any Functional modulle or BAPI programe?
    i,e, I want know last goods receipt details (MIGO)  based on material number.
    Can u please anybody tell me.
    Thanks,
    S.Muthu.
    Edited by: Subramaniyan Marimuthu on Jan 2, 2008 9:07 AM

    Hello.
    Check the BAPI_GOODSMVT_GETITEMS
    -example--
    Get GRs after a specific date for a specific plant/ storage location and movement types
      wa_budats-sign = 'I'.
      wa_budats-option = 'GE'.
      wa_budats-low = '20071201'.
      APPEND wa_budats TO budats.
      wa_plants-sign = 'I'.
      wa_plants-option = 'EQ'.
      wa_plants-low = '1000'.
      APPEND wa_plants TO plants.
      wa_stlocs-sign = 'I'.
      wa_stlocs-option = 'EQ'.
      wa_stlocs-low = '0001'.
      APPEND wa_stlocs TO stlocs.
      wa_mvts-sign = 'I'.
      wa_mvts-option = 'EQ'.
      wa_mvts-low = '101'.
      APPEND wa_mvts TO mvts.
      wa_mvts-low = '901'.
      APPEND wa_mvts TO mvts.
      wa_mvts-low = '123'.
      APPEND wa_mvts TO mvts.
      CALL FUNCTION 'BAPI_GOODSMVT_GETITEMS'
        TABLES
          plant_ra        = plants
          stge_loc_ra     = stlocs
          move_type_ra    = mvts
          pstng_date_ra   = budats
          goodsmvt_header = header
          goodsmvt_items  = item
          return          = return.
    Reward if helpful.
    Cheers,
    George

  • Select First 10 rows of data based on dates

    Hi,
    Have a report like this
    "Object Name", "Object Type", "Complexity", "Task Name", "RCCL Close Date"
    ABC XXX MEDIUM Design 1-1-2008
    BBC XXX MEDIUM Design 2-1-2008
    ABC XXX MEDIUM Design 3-1-2008
    BBC XXX MEDIUM Design 4-1-2008
    ABC XXX MEDIUM Design 5-1-2008
    BBC XXX MEDIUM Design 6-1-2008
    ABC XXX MEDIUM Design 7-1-2008
    BBC XXX MEDIUM Design 8-1-2008
    ABC XXX MEDIUM Design 9-1-2008
    BBC XXX MEDIUM Design 10-1-2008
    ABC XXX MEDIUM Design 11-1-2008
    BBC XXX MEDIUM Design 12-1-2008
    ABC XXX MEDIUM Design 13-1-2008
    BBC XXX MEDIUM Design 14-1-2008
    ABC XXX MEDIUM Design 15-1-2008
    BBC XXX MEDIUM Design 16-1-2008
    How to select the first 10 rows using a sql query please suggest me..
    Thanks
    Sudhir.

    I tryed your code but this is returning only the 10th row data not all 10 rows data please suggest me how to modify the code
    The code below is wht i am using to execute. when i put a condition rno >= 10 it is showing me the 10th row data.
    only single row. please suggest me in modifying the code
    select
    from
    select
    "Project Name",
    "Object Name",
    "Object Type",
    "Complexity",
    "Task Name",
    "Actual Effort",
    "Plan Effort",
    "Close Date",
    --count(*) over (partition by "Object Name" order by "Close Date" ) recs
    row_number() over(order by "Close Date") rno
    from
    SELECT
    "Project Name",
    "Object Name",
    "Object Type",
    "Complexity",
    MAX("Task Name") "Task Name",
    SUM("Actual Effort") "Actual Effort",
    SUM("Plan Effort") "Plan Effort",
    MAX("Close Date") "Close Date"
    FROM
    SELECT
    "Project Name",
    "Object Name",
    "Object Type",
    "Complexity",
    MAX("Task Name") "Task Name",
    SUM("Actual Effort") "Actual Effort",
    SUM("Plan Effort") "Plan Effort",
    SUM("EV") "EV",
    MAX("Close Date") "Close Date"
    FROM
    SELECT
    INITCAP(pro.project_name) "Project Name",
    INITCAP(pobj.name) "Object Name",
    INITCAP(POBJ.PROGRAM_TYPE) "Object Type",
    INITCAP(POBJ.COMPLEXITY) "Complexity",
    INITCAP(tas.name) "Task Name",
    SUM( nvl(TCL.NUM_HOURS_DAY1,0) + nvl(TCL.NUM_HOURS_DAY2,0) +
    nvl(TCL.NUM_HOURS_DAY3,0) + nvl(TCL.NUM_HOURS_DAY4,0) +
    nvl(TCL.NUM_HOURS_DAY5,0) + nvl(TCL.NUM_HOURS_DAY6,0) +
    nvl(TCL.NUM_HOURS_DAY7,0) ) "Actual Effort",
    CASE
    WHEN upper(:P68_TASK) LIKE UPPER('Incomming-Doc Review') Then SR.INCOMMING_DOC
    WHEN upper(:P68_TASK) LIKE UPPER('Design') Then
    SR.DESIGN
    WHEN upper(:P68_TASK) LIKE UPPER('Design Review') Then
    SR.DESIGN_REVIEW
    WHEN upper(:P68_TASK) LIKE UPPER('Design Rework') Then
    SR.DESIGN_REWORK
    WHEN upper(:P68_TASK) LIKE UPPER('Build') Then
    SR.BUILD
    WHEN upper(:P68_TASK) LIKE UPPER('Build Review') Then
    SR.BUILD_REVIEW
    WHEN upper(:P68_TASK) LIKE UPPER('Build Rework') Then
    SR.BUILD_REWORK
    WHEN :P68_TASK in ('Test Plan Prep','Unit Test Plan') Then
    SR.TEST_CASE_PREP
    WHEN :P68_TASK in ('Test Plan Review','Unit Test Plan Review') Then
    SR.TEST_CASE_REVIEW
    WHEN :P68_TASK in ('Test Plan Rework','Unit Test Plan Rework') Then
    SR.TEST_CASE_REWORK
    WHEN :P68_TASK in ('Testing','Unit Testing') Then
    SR.UNIT_TESTING
    WHEN :P68_TASK in ('Test Result Review','Unit Test Result Review') Then
    SR.TEST_RESULT_REVIEW
    WHEN upper(:P68_TASK) LIKE UPPER('Installation Review') Then
    SR.INSTALLATION_SCRIPT
    WHEN upper(:P68_TASK) LIKE UPPER('Release-Review') Then
    SR.RELEASE_REVIEW
    WHEN upper(:P68_TASK) LIKE UPPER('FDD Review') Then
    SR.FDD_REVIEW
    End "Plan Effort",
    CASE
    WHEN upper(:P68_TASK) LIKE UPPER('Incomming-Doc Review') Then
    trunc((((
    SUM( nvl(TCL.NUM_HOURS_DAY1,0) + nvl(TCL.NUM_HOURS_DAY2,0) +
    nvl(TCL.NUM_HOURS_DAY3,0) + nvl(TCL.NUM_HOURS_DAY4,0) +
    nvl(TCL.NUM_HOURS_DAY5,0) + nvl(TCL.NUM_HOURS_DAY6,0) +
    nvl(TCL.NUM_HOURS_DAY7,0) )
    nvl(SR.INCOMMING_DOC,0)
    ) / decode(SR.INCOMMING_DOC,0,null,SR.INCOMMING_DOC) ) * 100 ),2)
    WHEN upper(:P68_TASK) LIKE UPPER('Design') Then
    trunc((((
    SUM( nvl(TCL.NUM_HOURS_DAY1,0) + nvl(TCL.NUM_HOURS_DAY2,0) +
    nvl(TCL.NUM_HOURS_DAY3,0) + nvl(TCL.NUM_HOURS_DAY4,0) +
    nvl(TCL.NUM_HOURS_DAY5,0) + nvl(TCL.NUM_HOURS_DAY6,0) +
    nvl(TCL.NUM_HOURS_DAY7,0) )
    nvl(SR.DESIGN,0)
    ) / decode(SR.DESIGN,0,null,SR.DESIGN) ) * 100 ),2)
    WHEN upper(:P68_TASK) LIKE UPPER('Design Review') Then
    trunc((((
    SUM( nvl(TCL.NUM_HOURS_DAY1,0) + nvl(TCL.NUM_HOURS_DAY2,0) +
    nvl(TCL.NUM_HOURS_DAY3,0) + nvl(TCL.NUM_HOURS_DAY4,0) +
    nvl(TCL.NUM_HOURS_DAY5,0) + nvl(TCL.NUM_HOURS_DAY6,0) +
    nvl(TCL.NUM_HOURS_DAY7,0) )
    nvl(SR.DESIGN_REVIEW,0)
    ) / decode(SR.DESIGN_REVIEW,0,null,SR.DESIGN_REVIEW) ) * 100 ),2)
    WHEN upper(:P68_TASK) LIKE UPPER('Design Rework') Then
    trunc((((
    SUM( nvl(TCL.NUM_HOURS_DAY1,0) + nvl(TCL.NUM_HOURS_DAY2,0) +
    nvl(TCL.NUM_HOURS_DAY3,0) + nvl(TCL.NUM_HOURS_DAY4,0) +
    nvl(TCL.NUM_HOURS_DAY5,0) + nvl(TCL.NUM_HOURS_DAY6,0) +
    nvl(TCL.NUM_HOURS_DAY7,0) )
    nvl(SR.DESIGN_REWORK,0)
    ) / decode(SR.DESIGN_REWORK,0,null,SR.DESIGN_REWORK) ) * 100 ),2)
    WHEN upper(:P68_TASK) LIKE UPPER('Build') Then
    trunc((((
    SUM( nvl(TCL.NUM_HOURS_DAY1,0) + nvl(TCL.NUM_HOURS_DAY2,0) +
    nvl(TCL.NUM_HOURS_DAY3,0) + nvl(TCL.NUM_HOURS_DAY4,0) +
    nvl(TCL.NUM_HOURS_DAY5,0) + nvl(TCL.NUM_HOURS_DAY6,0) +
    nvl(TCL.NUM_HOURS_DAY7,0) )
    nvl(SR.BUILD,0)
    ) / decode(SR.BUILD,0,null,SR.BUILD) ) * 100 ),2)
    WHEN upper(:P68_TASK) LIKE UPPER('Build Review') Then
    trunc((((
    SUM( nvl(TCL.NUM_HOURS_DAY1,0) + nvl(TCL.NUM_HOURS_DAY2,0) +
    nvl(TCL.NUM_HOURS_DAY3,0) + nvl(TCL.NUM_HOURS_DAY4,0) +
    nvl(TCL.NUM_HOURS_DAY5,0) + nvl(TCL.NUM_HOURS_DAY6,0) +
    nvl(TCL.NUM_HOURS_DAY7,0) )
    nvl(SR.BUILD_REVIEW,0)
    ) / decode(SR.BUILD_REVIEW,0,null,SR.BUILD_REVIEW) ) * 100 ),2)
    WHEN upper(:P68_TASK) LIKE UPPER('Build Rework') Then
    trunc((((
    SUM( nvl(TCL.NUM_HOURS_DAY1,0) + nvl(TCL.NUM_HOURS_DAY2,0) +
    nvl(TCL.NUM_HOURS_DAY3,0) + nvl(TCL.NUM_HOURS_DAY4,0) +
    nvl(TCL.NUM_HOURS_DAY5,0) + nvl(TCL.NUM_HOURS_DAY6,0) +
    nvl(TCL.NUM_HOURS_DAY7,0) )
    nvl(SR.BUILD_REWORK,0)
    ) / decode(SR.BUILD_REWORK,0,null,SR.BUILD_REWORK) ) * 100 ),2)
    WHEN :P68_TASK in ('Test Plan Prep','Unit Test Plan') Then
    trunc((((
    SUM( nvl(TCL.NUM_HOURS_DAY1,0) + nvl(TCL.NUM_HOURS_DAY2,0) +
    nvl(TCL.NUM_HOURS_DAY3,0) + nvl(TCL.NUM_HOURS_DAY4,0) +
    nvl(TCL.NUM_HOURS_DAY5,0) + nvl(TCL.NUM_HOURS_DAY6,0) +
    nvl(TCL.NUM_HOURS_DAY7,0) )
    nvl(SR.TEST_CASE_PREP,0)
    ) / decode(SR.TEST_CASE_PREP,0,null,SR.TEST_CASE_PREP) ) * 100 ),2)
    WHEN :P68_TASK in ('Test Plan Review','Unit Test Plan Review') Then
    trunc((((
    SUM( nvl(TCL.NUM_HOURS_DAY1,0) + nvl(TCL.NUM_HOURS_DAY2,0) +
    nvl(TCL.NUM_HOURS_DAY3,0) + nvl(TCL.NUM_HOURS_DAY4,0) +
    nvl(TCL.NUM_HOURS_DAY5,0) + nvl(TCL.NUM_HOURS_DAY6,0) +
    nvl(TCL.NUM_HOURS_DAY7,0) )
    nvl(SR.TEST_CASE_REVIEW,0)
    ) / decode(SR.TEST_CASE_REVIEW,0,null,SR.TEST_CASE_REVIEW) ) * 100 ),2)
    WHEN :P68_TASK in ('Test Plan Rework','Unit Test Plan Rework') Then
    trunc((((
    SUM( nvl(TCL.NUM_HOURS_DAY1,0) + nvl(TCL.NUM_HOURS_DAY2,0) +
    nvl(TCL.NUM_HOURS_DAY3,0) + nvl(TCL.NUM_HOURS_DAY4,0) +
    nvl(TCL.NUM_HOURS_DAY5,0) + nvl(TCL.NUM_HOURS_DAY6,0) +
    nvl(TCL.NUM_HOURS_DAY7,0) )
    nvl(SR.TEST_CASE_REVIEW,0)
    ) / decode(SR.TEST_CASE_REWORK,0,null,SR.TEST_CASE_REWORK) ) * 100 ),2)
    WHEN :P68_TASK in ('Testing','Unit Testing') Then
    trunc((((
    SUM( nvl(TCL.NUM_HOURS_DAY1,0) + nvl(TCL.NUM_HOURS_DAY2,0) +
    nvl(TCL.NUM_HOURS_DAY3,0) + nvl(TCL.NUM_HOURS_DAY4,0) +
    nvl(TCL.NUM_HOURS_DAY5,0) + nvl(TCL.NUM_HOURS_DAY6,0) +
    nvl(TCL.NUM_HOURS_DAY7,0) )
    nvl(SR.UNIT_TESTING,0)
    ) / decode(SR.UNIT_TESTING,0,null,SR.UNIT_TESTING) ) * 100 ),2)
    WHEN :P68_TASK in ('Test Result Review','Unit Test Result Review') Then
    trunc((((
    SUM( nvl(TCL.NUM_HOURS_DAY1,0) + nvl(TCL.NUM_HOURS_DAY2,0) +
    nvl(TCL.NUM_HOURS_DAY3,0) + nvl(TCL.NUM_HOURS_DAY4,0) +
    nvl(TCL.NUM_HOURS_DAY5,0) + nvl(TCL.NUM_HOURS_DAY6,0) +
    nvl(TCL.NUM_HOURS_DAY7,0) )
    nvl(SR.TEST_RESULT_REVIEW,0)
    ) / decode(SR.TEST_RESULT_REVIEW,0,null,SR.TEST_RESULT_REVIEW) ) * 100 ),2)
    WHEN upper(:P68_TASK) LIKE UPPER('Installation Review') Then
    trunc((((
    SUM( nvl(TCL.NUM_HOURS_DAY1,0) + nvl(TCL.NUM_HOURS_DAY2,0) +
    nvl(TCL.NUM_HOURS_DAY3,0) + nvl(TCL.NUM_HOURS_DAY4,0) +
    nvl(TCL.NUM_HOURS_DAY5,0) + nvl(TCL.NUM_HOURS_DAY6,0) +
    nvl(TCL.NUM_HOURS_DAY7,0) )
    nvl(SR.INSTALLATION_SCRIPT,0)
    ) / decode(SR.INSTALLATION_SCRIPT,0,null,SR.INSTALLATION_SCRIPT) ) * 100 ),2)
    WHEN upper(:P68_TASK) LIKE UPPER('Release-Review') Then
    trunc((((
    SUM( nvl(TCL.NUM_HOURS_DAY1,0) + nvl(TCL.NUM_HOURS_DAY2,0) +
    nvl(TCL.NUM_HOURS_DAY3,0) + nvl(TCL.NUM_HOURS_DAY4,0) +
    nvl(TCL.NUM_HOURS_DAY5,0) + nvl(TCL.NUM_HOURS_DAY6,0) +
    nvl(TCL.NUM_HOURS_DAY7,0) )
    nvl(SR.RELEASE_REVIEW,0)
    ) / decode(SR.RELEASE_REVIEW,0,null,SR.RELEASE_REVIEW) ) * 100 ),2)
    WHEN upper(:P68_TASK) LIKE UPPER('FDD Review') Then
    trunc((((
    SUM( nvl(TCL.NUM_HOURS_DAY1,0) + nvl(TCL.NUM_HOURS_DAY2,0) +
    nvl(TCL.NUM_HOURS_DAY3,0) + nvl(TCL.NUM_HOURS_DAY4,0) +
    nvl(TCL.NUM_HOURS_DAY5,0) + nvl(TCL.NUM_HOURS_DAY6,0) +
    nvl(TCL.NUM_HOURS_DAY7,0) )
    nvl(SR.FDD_REVIEW,0)
    ) / decode(SR.FDD_REVIEW,0,null,SR.FDD_REVIEW) ) * 100 ),2)
    End "EV",
    NULL "Close Date"
    FROM
    timecard_lines tcl,
    project_objects pobj,
    tasks tas,
    projects pro,
    timecard_headers thr,
    TIMECARD_PERIODS TP,
    Sub_Proc_Replan SR
    WHERE
    pro.id = :P1_PROJECTS AND
    TP.ID = THR.TPD_ID AND
    tcl.pobj_id = pobj.id AND
    tcl.tas_id = tas.id AND
    pro.id = pobj.pro_id AND
    thr.id = tcl.thr_id AND
    pobj.id = tcl.pobj_id and
    PRO.ID = SR.PRO_ID AND
    POBJ.ID = SR.POBJ_ID AND
    upper(tas.name) like upper(:P68_TASK)
    and tas.name not in ('Wait Time','Wait time','Wait-Time','Project Management',
    'Quality Management','Offshore-Onsite','Wait_Time')
    and pobj.id in
    (SELECT distinct pobj.id
    FROM
    task_status ts,projects pro,project_objects pobj,task tsk
    ,employees emp,employee_project_pairs epp,REVIEW_ITEMS RI
    WHERE
    pro.id = :p1_projects and
    pobj.pro_id = pro.id
    and pro.id = ts.pro_id
    and pobj.id = ts.pro_obj_id
    and tsk.id = ts.task_id
    and emp.id = epp.emp_id
    and epp.pro_id = pro.id
    and ts.id = ri.ts_id
    and tsk.name in
    ('Incomming-Doc Review',
    'Incoming Doc- Review',
    'Incoming Doc- Review',
    'FDD - Review',
    'Architecture - Review',
    'Design Review',
    'Design - Review',
    'TDD - Review',
    'Build Review',
    'Build - Review',
    'Code - Review',
    'Code',
    'Test Result Review',
    'Test Result - Review',
    'UTR - Review',
    'Test - Review',
    'Installation Review',
    'Installation - Review',
    'Release-Review',
    'Release - Verification',
    'Migration & Release - Review',
    'Release - Review')
    and ts.status in ('CLOSE','ACCEPTED','closed')
    and ( upper(:P68_TASK) like '%'||upper(substr(tsk.name,1,5))||'%'
    or upper(:P68_TASK_NAMES) like '%'||upper(substr(tsk.name,1,5))||'%' )
    GROUP BY
    pro.project_name,pobj.name,tas.name,POBJ.PROGRAM_TYPE,POBJ.COMPLEXITY,SR."Effort",SR.INCOMMING_DOC,SR.DESIGN,SR.DESIGN_REVIEW,SR.DESIGN_REWORK,SR.BUILD,
    SR.BUILD_REVIEW,SR.BUILD_REWORK,SR.TEST_CASE_PREP,SR.TEST_CASE_REVIEW,
    SR.TEST_CASE_REWORK,SR.UNIT_TESTING,SR.TEST_RESULT_REVIEW,
    SR.INSTALLATION_SCRIPT,SR.RELEASE_REVIEW,SR.FDD_REVIEW
    UNION
    SELECT distinct
    INITCAP(pro.project_name) "Project Name",
    INITCAP(pobj.name) "Object Name",
    INITCAP(POBJ.PROGRAM_TYPE) "Object Type",
    INITCAP(POBJ.COMPLEXITY) "Complexity",
    NULL "Task Name",
    NULL "Actual Effort",
    NULL "Plan Effort",
    NULL "EV",
    decode(
    MAX(ts.close_timestamp),null,
    MAX(ts.REVIEWER_ACCEPTED_DATE),
    MAX(ts.close_timestamp) ) "Close Date"
    FROM
    task_status ts,projects pro,project_objects pobj,task tsk
    ,employees emp,employee_project_pairs epp,REVIEW_ITEMS RI
    WHERE
    pro.id = :p1_projects and
    pobj.pro_id = pro.id
    and pro.id = ts.pro_id
    and pobj.id = ts.pro_obj_id
    and tsk.id = ts.task_id
    and emp.id = epp.emp_id
    and epp.pro_id = pro.id
    and ts.id = ri.ts_id
    and tsk.name in
    ('Incomming-Doc Review',
    'Incoming Doc- Review',
    'Incoming Doc- Review',
    'FDD - Review',
    'Architecture - Review',
    'Design Review',
    'Design - Review',
    'TDD - Review',
    'Build Review',
    'Build - Review',
    'Code - Review',
    'Code',
    'Test Result Review',
    'Test Result - Review',
    'UTR - Review',
    'Test - Review',
    'Installation Review',
    'Installation - Review',
    'Release-Review',
    'Release - Verification',
    'Migration & Release - Review',
    'Release - Review')
    and ts.status in ('CLOSE','ACCEPTED','closed')
    and ( upper(:P68_TASK) like '%'||upper(substr(tsk.name,1,5))||'%'
    or upper(:P68_TASK_NAMES) like '%'||upper(substr(tsk.name,1,5))||'%' )
    group by pro.project_name,pobj.name,tsk.name,POBJ.PROGRAM_TYPE,pobj.complexity
    GROUP BY "Project Name","Object Name", "Object Type", "Complexity"
    WHERE "Task Name" IS NOT NULL
    GROUP BY "Project Name","Object Name", "Object Type", "Complexity"
    order by "Close Date"
    where rno >= 10
    and rownum <= 10
    Thanks
    Sudhir

  • How to update row when data contains single quote  ?

    Hi,
    Please see this query:
    update query_tab set  title='It's common knowledg' where
    id='1121';I have this update query coming from .NET, but abviously this is error since single quote in the text (title column) given by user gives wrong meaning to sql parser. So, how to solve this problem ?
    Edited by: bootstrap on Dec 25, 2010 9:53 AM

    Hi,
    To include a single-quote in a string literal, use two of them in a row:
    update      query_tab
    set       title     = 'It''s common knowledge'
    where      id     = '1121';The method above works in any version of Oracle.
    Starting in Oracle 10, you can also use Q-notation, like this:
    update      query_tab
    set       title     = Q'[It's common knowledge]'
    where      id     = '1121';For details, look up "Text Literals" in the SQL Language manual:
    http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/sql_elements003.htm#sthref337

  • How to search xml file data based on the given keyword from html form

    hi,
    i'm new to XML. I have this problem regarding searching within a XML file.
    the
    idea is that my search will be based on the keyword entered
    in
    by the user from a HTML form. the keyword is then used to search all
    the
    question nodes and the choice nodes within a XML file. once the match
    is
    found, i will have to display the results.
    But i don't know how to do so - especially the part of searching xml file.
    Can
    anyone help me in this? Your help is much appreciated.
    Edited by: Moti_Lal.D on Apr 4, 2008 7:28 AM

    yeah.. what i was trying to do is
    i have one xml fine. then i have to read all the tag values say
    <book>
    <title>Java</title>
    <author>agarwal</author>
    <price>200</price>
    </book>
    <book>
    <title>Xml</title>
    <author>saxmann</author>
    <price>300</price>
    </book>
    i can read the tag values like this
    File file = new File("dom.xml");
    try {
    DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
    Document doc = builder.parse(file);
    NodeList nodes = doc.getElementsByTagName"book");
    for (int i = 0; i < nodes.getLength(); i++) {
    Element element = (Element) nodes.item(i);
    NodeList title = element.getElementsByTagName("title");
    Element line = (Element) title.item(0);
    what i want is i may give any xml file
    like File file = new File("xxx.xml");
    (it may be one level/two level/3level tagged one)
    then the i should read all the tag values and store them in some array. Then when i enter some character from keyboard (say "a") then it has to show all the tag values starts with "a" and display them.
    i guess u understand my problem.

Maybe you are looking for

  • Is there a way to auto-populate text based on a selection?

    I honestly don't even know how to word my question haha... so the title may be misleading... For my job I need to fill out indesign files, and at one part of the file based on the state a person is from I need to paste a specific e-mail in several pl

  • MS-Word mail merge funcionality

    I would like to have an editor with functionalities similar to MS-Word's mail merge. My website should be able to publish templates with dynamic data, from an external database. Can I have it with Muse or any other Adobe product ?

  • Trying to install photoshop CS6 trial, installer initializes then dissapears

    I'm trying to install the photoshop CS6 extended version trial, and when I start the installer, it opens the initializer, the bar fills, then it dissapears and nothing happens. I'm recently upgraded to windows 8.1, the trial used to work fine on wind

  • 1 year old 27"iMac screen keeps going black

    itunes is running in the background, nothing I can do except shut off surge protector... just started happening, mulitple times a day So NOT happy with Apple, a $3000 machine! really???  their products are not worth the premium anymore! not reliable!

  • ISCSI Software Target - Disk is corrupt (locally) not on on the target

    Hi, I have a Windows 2008R2 server on which i have installed Microsoft iSCSI Software Target. I have created a Virtual Disk and an iSCSI target configuration on this server. The target is a virtual server running Windows 2012R2. The target has the vi