Sum of column Forms 6i

Hello

I created a block with 15 records of brands for example for 15 subjects. now, I want to sum up this column, but when I take the text of the Ant or view the item with the sum of the setting of this column in the property happened 15 times. but I need that a registration.

If I'm moving that to other block throwing error. FRM-30377: Preview to the point must reside in the block of single record or within the same block that point summarized.

Please, help me to sum up this column.

Thank you

If I'm moving that to other block throwing error

Place the summary total item in a control block. On the property of this block range, under the box of records, set the property of single record Yes.

Tags: Oracle Development

Similar Questions

  • I have the table of 3 columns A, B, C. I want to store the sum of columns A B in the C column without using the DML statements. Can anyone help please how to do. ?

    I have the table of 3 columns A, B, C. I want to store the sum of columns A B in the C column without using the DML statements. Can anyone help please how to do. ?

    11.1 and especially you have virtual column

    SQL> create table t
      2  (
      3     a number
      4   , b number
      5   , c generated always as (a+b) virtual
      6  );
    
    Table created.
    
    SQL> insert into t (a, b) values (1, 2);
    
    1 row created.
    
    SQL> select * from t;
    
             A          B          C
    ---------- ---------- ----------
             1          2          3
    

    Before that, a front insert - trigger

    SQL> create table t
      2  (
      3     a number
      4   , b number
      5   , c number
      6  );
    
    Table created.
    
    SQL> create or replace trigger t_default before insert on t for each row
      2  begin
      3    :new.c := :new.a+:new.b;
      4  end;
      5  /
    
    Trigger created.
    
    SQL> insert into t (a, b) values (1, 2);
    
    1 row created.
    
    SQL> select * from t;
    
             A          B          C
    ---------- ---------- ----------
             1          2          3
    
  • The Master Table column updated based on the sum of column Table detail


    With the help of JDev 11.1.1.6.

    I have a master-detail table based on a link to BC.

    The main table has a column that displays an InputText or an OutputText, based on the value in another column.

    If the InputText is displayed, the user can enter a value and the database will be updated with that value.

    If the OutputText is displayed, it must be a sum of a column in the secondary table.  Also, this value will be written in the database.

    Question:

    How can I fill the OutputText in the main table with the sum of the values in a column in the secondary table?

    The detail table column is a manually entered InputText field.

    Thank you.

    Create a spike in the main table and write in its expression as follows - DetailVoAccessorName.sum ("ColumnName");

    This will calculate the sum of column table detail and then you can set the value of the transient attribute to attribute DB on backup operation

    Ashish

  • SUM of columns in lines

    Dear members,

    Suppose I have a command name table and this table has 3 columns by name order_number, travel and net_weight.

    The data are as follows:
    Trip    order#     net_weight
    ----------------------------------------------------
    1876    1234          450
    1876    5678          300
    7865    6783          250
    7865    9738          350
    Of the above, you can see that there are 2 lines, I need to write a SQL in such a way that my data should like below:

    Trip   order#  net_weight      sum
    ------------------------------------------------------
    1876    1234          450         750
    1876    5678          300         750
    7865    6783          250         600
    7865    9738          350         600
    The new sum of column is the sum of net_weight based on the trip.

    sum = 750-> (450 + 300 based on trip 1876)
    sum = 600-> (250 + 350 based on trip 7865)


    How can I write a SQL query to get the data as described above.

    Thank you
    Sandeep

    Use analytical SUM:

    with t as (
               select 1876 trip,1234 order#,450 net_weight from dual union all
               select 1876,5678,300 from dual union all
               select 7865,6783,250 from dual union all
               select 7865,9738,350 from dual
              )
    -- end of on-the-fly data sample
    select  trip,
            order#,
            net_weight,
            sum(net_weight) over(partition by trip) total_net_weight
      from  t
      order by trip
    /
    
          TRIP     ORDER# NET_WEIGHT TOTAL_NET_WEIGHT
    ---------- ---------- ---------- ----------------
          1876       1234        450              750
          1876       5678        300              750
          7865       6783        250              600
          7865       9738        350              600
    
    SQL> 
    

    SY.

  • sum of column that contains the values in the time format

    Hi all

    I give you a piece of my code below
    SELECT  dif.EMPLOYEE_NUMBER Employee#, dif.FULL_name EmployeeName,
     TO_CHAR(START_DATE,'dd-Mon-rrrr') DOJ ,dif.DEPT_NAME,POSITION , DATE_ENTRAY AttendanceDate,
    
     to_char(DATE_ENTRAY,'DY') day, TO_CHAR(LNE1,'hh24:mi')TimeIn1 ,TO_CHAR(LNE2,'hh24:mi')TimeOut1,
     
     TO_CHAR(LNE3,'hh24:mi')TimeIn2 ,TO_CHAR(LNE4,'hh24:mi')TimeOut2, TO_CHAR(LNE5,'hh24:mi')TimeIn3 ,
    
     TO_CHAR(LNE6,'hh24:mi')TimeOut3, to_char(decode(LNE8,null ,
    
     decode(LNE7,null, decode(LNE6,null, decode(LNE5,null, decode(LNE4,null, decode(LNE3,null,
    
     decode(LNE2,null,LNE2 ,LNE2 ),LNE3 ),LNE4 ),LNE5 ),LNE6 ),LNE7 ),LNE8 ),'hh24:mi')TimeOuts ,
     
     ACT_HOUR Work_Hrs, 
    
    decode(DLY_ABSENT_TYPE,'Late',DED_ABS ,'Late (Deduction)',DED_ABS,'00:00') Late_Hrs,ACT_OVT Over_Time
     FROM jjj_PUNCH_DATA_EMP_LIST trn , 
     jjj_emp_def dif,jjj_PUNCH_CARD_ELEG ele WHERE trn.EMPLOYEE_NUMBER =dif.EMPLOYEE_NUMBER and   
     ele.EMPLOYEE_NUMBER =trn.EMPLOYEE_NUMBER  and   DATE_ENTRAY between '23-Aug-2009' and  '24-Aug-2009' 
    
    I require to find the sum of column  wrk_hrs
    Act_hour or wrk_hrs belongs to table  jjj_PUNCH_DATA_EMP_LIST trn , and the datatype of act_hour is varchar(10 byte)
    the values of column act_hrs, (i require the sum of this column)
    08:00
    07:22
    06:08
    kindly help
    thanking in advance

    concerning
    Oracle user

    Hello

    Thanks for posting the CREATE TABLE and INSERT. That really helps.

    Do you want 19:33 ' as the output? Which makes it look like 19 hours and 33 minutes. Most people would represent 19.33 hours (i.e. 19 more than 1/3 hours) as 19:20 '. Should not the sum of
    ' x: 00 ' and
    'y: 20' be
    "z: 20?

    If you really want 19:33 ', see the solution of Hoek.

    If you really want 19:20 ', then you were on the right track.
    I think that you were trying to do:

    WITH  got_total_hours     AS
    (
         SELECT SUM (   TO_NUMBER (SUBSTR (act_hour, 1, 2))
                    + ( TO_NUMBER (SUBSTR (act_hour, 4, 2))
                      / 60
                      )
                    ) AS total_hours
         from      p
    )
    SELECT        TO_CHAR (FLOOR (total_hours))
           || ':'
           || TO_CHAR ( MOD (total_hours, 1) * 60
                   , 'fm00'
                   )     AS hh_mm
    FROM     got_total_hours
    ;
    

    Looks like you were trying calculate total_hours in a subquery, then use the total_hour alias in a query Super, which is quite accurate. You're just confused on how to write a subquery.
    There are two basic ways to write subqueries:

    (1) WITH clause:

    WITH  sub_query  AS
    (
         SELECT  ...
    )
    SELECT  ...
    FROM      sub_query
    ;
    

    (2) online review

    SELECT     ...
    FROM     (     -- Begin sub_query
         SELECT     ...
         )     -- End sub-query
    ;
    

    Looks like you tried a bit of each method.

    In most cases (this included problem) either one will work.
    Other problems are much easier by using a WITH clause and WITH clauses are usually easier to read and understand, I recommend that you always use a WITH clause rather than views online.

    You can also change the Hoek solution to get the result 19:20 ' without a subquery (or without using any expression complicated, more than once, which is the only reason why I have proposed a subquery). Since date arithmetic Oracle comes from the days, not hours, when the solution of Hoek has calculated the number of hours, you'll have to divide by 24 to get the number of days. If you are using TO_CHAR to fit the time, however, the results can be confusing if the total is 24 hours or more. You might be better off using NUMTODSINTERVAL.

  • Sum of columns using Formcalc

    I created a form with 12 columns and 23 fixed lines. In line 1 of table is a value, the 22 remaining lines allow the user to enter a number, what I would like task is in the footer line power add up the figures in 22 columns and then multiple that by rank value for a total 1.

    Any help would be appreciated.

    Hi Steve,.

    for now, I'll send your pdf with the calculation script.

    You must use the following script in each column in the total field

    -Sterling is the objectname in the user input in column 1 in each row field

    -Various is the objectname in the user input in column 1 in each row field

    - ...

    Column $ = Sum(Row1[*].Sterling)* Row1.TTValue
    Columns $ = Sum(Row1[*].Other)* Row1.OtherValue
    Column $ = Sum(Row1[*].Banking)* Row1.BankingValue
    

    You understand that?

    You must use the [*] the repeated thing, in your, this is the Row1. You can see on the Row1 [0]... Row1 [1). And your amount, for example 4 oder 7.50 needs a static cross reference by column.

    I hope I could help?

    Mandy

  • Creating columns form

    Hi all

    I want to create the formula column in the apex as in Oracle Forms.
    I would like to know how (the properties to set process or anything else) to use the formula and where.

    For example:
    Suppose I have two text elements: as soon as a value is entered in one of the two columns of its sum should be displayed in a third display only the text point.

    Hoping for a quick answer.

    Thanks in advance.

    Arif Khadas

    Hello

    OK, we start a new page from the beginning.

    I'll use the EMP table for this. I've added a new field called 'TOTAL' to this table. If you want to do exactly the same thing as I did (so that you can repeat exactly to see what he does, and then you create have a page for your own table), go to the workshop of SQL, SQL commands and run the following statement:

    alter table "EMP" add ("TOTAL" NUMBER(10,2))
    

    Note that the following instructions to create the page were made 4 Apex - if any step is different, if all goes well it should be clear what needs to be done.

    1. in your application, click on the button create a new Page

    2 - Click on the shape option (this leads to the next page, if it is not, click Next)

    3 ' form on a Table or view' should already be selected, then click Next

    4 - Select the name of your landlord ("scheme") and click Next

    5 - Enter the name of the table: EMP

    6. replace the Page number by 100 (I am going to use page 100 in this example, but if you already have a 100 page, change that - but you also need to make the same changes in the rest of these instructions, whenever I use P100_... you must use Pn_, where n is the number of page). For this example, leave the other settings as they are and click Next

    7. let the tabs setting as 'do not use tabs' (unless you particularly want to use the tabs) and click Next

    8 - primary keys must be just EMPNO, so click Next

    9 - the trigger should be 'Existing trigger', so click Next

    10. for the list of fields, ctrl-click to select only the ENAME, SAL, COMM and TOTAL. Then click Next

    11 change the 'Show' button options to only show that Yes for 'Show the button Save' - we want only to update existing records for now. Then click Next

    12. for the two branches, enter 100 (or any page number you are using) and click Next

    13 - Finally, click on finish

    14 - the page should now be created, click on Edit Page

    You should now be on the definition of page to page 100. Now, we need to change the page to (A) add in the Select list and (B) in the javascript code. First of all, we must make some adjustments to existing items.

    1. under 'Process' in the column "Treatment of the Page", click on "reset page", click on the button Delete and confirm the deletion - we don't want this process on this page

    2 - Click on the "Go to Page" branch and change the sequence number to 20 and click on apply changes. We will create another branch and this must be the first

    3 - Click on the region of 'Form on EMP' and change the sequence number to 20 and click on apply changes. We will create a new region for the select list and need this to be the first.

    4 - Click the P100_ENAME element and change the option "display as" to "View only" and click on apply changes. We want to only display the name of the employee.

    5 - Click the item P100_TOTAL and enter the following information in the HTML Form element attributes:

    disabled="DISABLED"
    

    The page is now ready for us to add new features. First, let's add a new region and a Select list:

    1 - click create in the regions section

    2 - the HTML option should be selected already, so just the click Next

    3 - the HTML option should be selected already, so just the click Next

    4. enter employee Select in the title parameter, change the setting in sequence to 10 and click Next

    5 - click on Create Region. This creates an 'empty' region has nothing other than the title

    6 - click the create in the items section

    7. (things have changed slightly the Apex 4 - so I think your next step is to choose 'Select list with Submit')

    8 - the element name must be "P100_SELECTED_EMPLOYEE" and the region should be the region "Select Employee" you just created. Click next

    9. allow the attributes of the element and click Next

    10 - the next page should be "To identify the list of values" (Apex 4 is different here once again, so I'm going from memory). Need to be addressed here:

    Display the Null value: Yes
    NULL value: - select -.
    List of query values:

    SELECT ENAME d, EMPNO r
    FROM EMP
    ORDER BY UPPER(ENAME)
    

    11 - click Next

    12 - Click on create element

    13. If you now run the page, you should see your new region with the selection list and region of origin with the employee fields. Click on Edit Page 100 to return to the definition of the page

    14 - click the create in the Branches section

    15 - click next to keep Point of branch/Type settings

    16 - Enter the following command:

    Page: 100
    Clear Cache: 100
    Place these items: P100_EMPNO, P100_SELECTED_EMPLOYEE
    With these values: & P100_SELECTED_EMPLOYEE, & P100_SELECTED_EMPLOYEE.
    (Make sure that you copy it & and text as well as these are important)

    17 - click Next

    You choose the sequence 10
    Set the Type of Condition to "request = Expression 1" and enter P100_SELECTED_EMPLOYEE 1 Expression

    Click create a branch

    When we use a Select list with Submit, as soon as an element is selected in the list, the page is sent and this new branch tells Apex what to do. In this case, we plug back to page 100 and place two elements - the P100_SELECTED_EMPLOYEE, select the list item (so that we can keep the selection) and P100_EMPNO so that the standard functionality of the Apex can recover data for the selected employee. To make sure that this branch is triggered by the selection list, we need to define the Type of Condition that above.

    When the branch was created, make sure that it is the first listed - if this is not the case, edit and change the sequence number

    If you now run the page, select the employee in the list and the page should submit and recharge with the employee data. Once finished, click on the option change Page 100 to return to the definition of the page

    Now we can add the functionality to calculate the total

    1 - click the icon change in the section of the Page and enter the following information in the header HTML:

    <script type="text/javascript">
    function calculateTotal()
    {
     var v1 = $v('P100_SAL');
     var v2 = $v('P100_COMM');
     $x('P100_TOTAL').value = parseFloat('0' + v1) + parseFloat('0' + v2);
    }
    </script>
    

    Click on apply changes to save

    2 - Click on the link P100_SAL and enter the following information in the HTML Form element attributes:

    onChange="javascript:calculateTotal();"
    

    then click on apply changes to save that.

    3 - Repeat this step for article P100_COMM

    4 - Click on the form on the link of EMP in the region section, and enter the following in the Footer area:

    <script type="text/javascript">
    calculateTotal();
    </script>
    

    Click on apply changes to save

    You can now run the page

    By following these instructions, I created a new page: http://http://apex.oracle.com/pls/otn/f?p=19036:100

    Andy

  • SUM OF COLUMN IN A TABLE.

    How can I make the sum of the rows in a table in the apex oracle 4.2.6.

    I want to perform validations on adj_amount column in a table. If the adj_amount column for the selected row is < = 0 then return false.

    How can I choose the name of the column of tabular presentation in validation.

    Hi Maxence,

    CORINE wrote:

    How can I make the sum of the rows in a table in the apex oracle 4.2.6.

    I want to perform validations on adj_amount column in a table. If the adj_amount column for the selected row is<=0 then="" return="">

    How can I choose the name of the column of tabular presentation in validation.

    Always provide the necessary information on your question.

    Members of the Forum cannot determine information such as the type of tabular presentation, you use (i.e. Assistant generated/manual based on APEX_ITEM).

    Now, the information you have provided, I concluded you want proof on a certain column the sum of this column must be greater than zero.

    Well, you can use a "PLSQL function return Boolean" type, the level of the Page using APEX_APPLICATION validation. G_FXX berries.

    Determine a column which is not null loop through this column and the adj_amount of the amount column. Determine if the sum is greater than zero and therefore trigger the validation.

    Validation sample code would be:

    DECLARE
    
      L_ADJ_AMOUNT_SUM NUMBER := 0;
    
    BEGIN
    
      FOR I in 1 .. APEX_APPLICATION.G_F01.COUNT LOOP
        L_ADJ_AMOUNT_SUM := L_ADJ_AMOUNT_SUM + TO_NUMBER(NVL(APEX_APPLICATION.G_F02(I),0));
      END LOOP;
    
      IF L_ADJ_AMOUNT_SUM <= 0 THEN
        RETURN FALSE;
      ELSE
        RETURN TRUE;
      END IF;
    
    END;
    

    Here APEX_APPLICATION. G_F01 is a column not null and APEX_APPLICATION. G_F02's adj_amount column for example.

    NOTE: You can use a code inspection tools in the browser to identify to which column is mapped to APEX_APPLICATION. Table G_FXX.

    Just inspect element in the column to determine the name attribute. If name = "f04" then it is mapped to APEX_APPLICATION. G_F04.

    I hope this helps!

    Kind regards

    Kiran

  • Sum of columns together in the responses, and then calculated off summary columns

    I have three questions answers (with 4 columns) that I have gathered the results for:

    Four columns are: campaign # promoted # Respones, # Respones promoted

    Query 1:

    Campaign, # promoted, 0, 0

    Query 2:

    Campaign responses #, 0, 0,.

    Query 3:

    Campaign, 0, 0, # promoted Respones

    My query returns the following (assuming that the campaign code is ABC) 3 rows:

    Campaign of # Promoted # Responses # Promoted answers
    ABC10000
    ABC0120
    ABC009

    I want to put in place so that it adds campaign to get a row of results as follows:

    Campaign of # Promoted # Responses # Promoted answers
    ABC100129

    I can get this result using the conversion to a PivotTable (won't go thought road if possible because I have other calculations that I need to add).   Once I get this summary to a single row result I then do a few such analyses that create:

    1. Response % (Respones # / # promoted)
    2. Promoted to the rank of % (# promoted answers / # promoted)

    When I add the calculatinos to the percentages to the United query I get null or zero for my results.   I used the Add button to insert a calcuation and then I used the following formula: saw_2 / saw_3

    Here's what I would preferably:

    1. Sum of answers (not a pivot table) Table columns.
    2. Add columns calculated at United query that will produce results based on the combined pivot columns
    3. If I use the PivotTable, and then how to get the values calculated for work

    Thank you...

    Ben,

    Try to use the rule of aggregation on the columns in the Table view and see if that makes a difference.

    I just tried this and the SUM of each of the criteria provided the results I wanted, which in turn you are looking for.

    If nothing works for you send me the screenshot of what you are trying to do at vijaybez at gmail and I can understand what is happening properly...

  • sum of columns query

    Hi friends

    I use the Oracle 10 g with windows server 2008 Server. How to recover the sum of values of different column based on different conditions

    Name of the table - stv_dtls

    inv_type varchar2 (5)

    credit number (12,2)

    Case number (12,2)

    name of the column - inv_type - four type of values - type1, type2, type3, null (empty column)

    I want to make the sum of the column of credit under the title of type1 and type2, type3, amount of money under the title of cash based on type1, type2, type 3 and adding the total credits and cash

    and null I show you separate.

    TYPE_1_CR TYPE_1_CA TYPE_2_CR TYPE_2_CA TYPE_3_CR TYPE_3_CA TOTAL CASH Null type CASH

    Sum (Credit) sum (cash) sum (credit) sum (cash) sum (credit) sum (cash) sum of all type (CR) sum of money (credit) sum, sum (cash)

    Kindly give me a suggestion to solve this query

    concerning

    RDK

    Hello

    Looks like you want to use the SUM aggregate function, using CASE expressions when you want to include only certain types:

    SELECT SUM (CASE WHEN inv_type = 'type1' CAN in the end credit) AS type_1_cr

    , SUM (CASE WHEN inv_type = 'type1' CAN collect END) AS type_1_ca

    , SUM (CASE WHEN inv_type = 'type2' CAN in the end credit) AS type_2_cr

    , SUM (CASE WHEN inv_type = 'type2' CAN collect END) AS type_2_ca

    , SUM (CASE WHEN inv_type = 'type3' CAN in the end credit) AS type_3_cr

    , SUM (CASE WHEN inv_type = 'type3' CAN collect END) AS type_3_ca

    SUM (cash) AS total_ca

    The amount (credit) AS total_cr

    , SUM (CASE WHEN inv_type IS NULL THEN credit END) AS null_cr

    SUM (CASE WHEN inv_type IS NULL THEN silver END) AS null_ca

    OF stv_dtls

    ;

    It will work in Oracle 8.1 and higher, but as of version 11.1, you would like to use SELECT... PIVOT.

    I hope that answers your question.

    If not, post a small example data (CREATE TABLE and only relevant columns, INSERT statements), and the results you want from this data.

    See the FAQ forum: https://forums.oracle.com/message/9362002#9362002

  • Format and the sum of the form feature does not

    Acrobat 10.1.8

    My bank deposit form, I have used for months has stopped working!

    The format $ does not work, it adds the numbers - the sum function is also more... I deleted it, started to scratch etc. Is there a problem with the new update for 10.1.8?

    Hi [email protected],

    There is not this known issue with Acrobat 10.1.8

    There must be something in the form itself that should be checked.

    Please contact Acrobat support and share the form to get help.

  • sum of column

    Hello

    Can someone show me the best query to get the below output


    The code I used to read me the below one, but I am confused on how to get the total general.
    select grade,sum(losal)lowsal,sum(hisal)hisal,sum(losal+hisal)as total from SALGRADE
    group by grade
    OUTPUT-

    LOWSAL OF THE CATEGORY WILL DESIGNATE TOTAL

    1 1000 2422 3422
    2 1801 2490 4291
    4 2001 3000 5001
    5, 3001, 9999, 13000
    3 1401 2000 3401
    TOTAL OF THE COLUMN "TOTAL".



    CREATE TABLE SALGRADE
    (
    NUMBER OF GRADE,
    NUMBER OF IT,
    NUMBER OF DESIGNATE
    )

    INSERT INTO SALGRADE (GRADE, IT, WILL DESIGNATE) VALUES)
    1, 300, 1222).
    INSERT INTO SALGRADE (GRADE, IT, WILL DESIGNATE) VALUES)
    2, 300, 545);
    INSERT INTO SALGRADE (GRADE, IT, WILL DESIGNATE) VALUES)
    1, 700, 1200);
    INSERT INTO SALGRADE (GRADE, IT, WILL DESIGNATE) VALUES)
    2, 1201, 1400);
    INSERT INTO SALGRADE (GRADE, IT, WILL DESIGNATE) VALUES)
    3, 1401, 2000);
    INSERT INTO SALGRADE (GRADE, IT, WILL DESIGNATE) VALUES)
    4, 2001, 3000);
    INSERT INTO SALGRADE (GRADE, IT, WILL DESIGNATE) VALUES)
    5, 3001, 9999);
    INSERT INTO SALGRADE (GRADE, IT, WILL DESIGNATE) VALUES)
    2, 300, 545);
    COMMIT;



    Thank you

    Published by: GIRIKAIMAL on May 11, 2012 09:58

    Published by: GIRIKAIMAL on May 11, 2012 09:59

    Total general for all columns:

    select  grade,
            sum(losal) lowsal,
            sum(hisal) hisal,
            sum(losal+hisal) total
      from  salgrade
      group by grouping sets((),(grade))
      order by grade nulls last
    /
    
         GRADE     LOWSAL      HISAL      TOTAL
    ---------- ---------- ---------- ----------
             1       1700       3622       5322
             2       3002       3890       6892
             3       2802       4000       6802
             4       4002       6000      10002
             5       6002      19998      26000
                    17508      37510      55018
    
    6 rows selected.
    

    Total general just for the total column:

    select  grade,
            sign(grade) * sum(losal) lowsal,
            sign(grade) * sum(hisal) hisal,
            sum(losal+hisal) total
      from  salgrade
      group by grouping sets((),(grade))
      order by grade nulls last
    /
    
         GRADE     LOWSAL      HISAL      TOTAL
    ---------- ---------- ---------- ----------
             1       1700       3622       5322
             2       3002       3890       6892
             3       2802       4000       6802
             4       4002       6000      10002
             5       6002      19998      26000
                                          55018
    
    6 rows selected.
    
    SQL> 
    

    SY.

  • sum of column values

    Hello

    My question is - I would like to make the sum of the column "volume".
    Current Output     
    ENVIRONMENT     Volume
    Production              79
    QA                 66
    Development     30
         
    Desired Output     
    ENVIRONMENT     Volume
    Production                     79
    QA                     66
    Development     30
    *Total                    175*
     
    select * from (
    select ci.environment, count(1) "Volume"           
    from tsgdw_task@awhsncp1 t, 
               tsgdw_operational_process@awhsncp1 op,
               tsgdw_support_group@awhsncp1 sg,
               tsgdw_person@awhsncp1 p,
               tsgdw_configuration_item@awhsncp1  ci
    where sg.SUPPORT_GROUP_SEQ_ID in (SELECT sg2.SUPPORT_GROUP_SEQ_ID  FROM  tsgdw_support_group@awhsncp1 sg2
                             start with sg2.SEARCH_CODE = 'DBNONEC' --p_target_name 
                             connect by prior sg2.SUPPORT_GROUP_SEQ_ID=sg2. PARENT_SUPPORT_GROUP_SEQ_ID)
            and t.task_seq_id = op.task_seq_id
            and sg.support_group_seq_id = op.support_group_seq_id
            and op.assigned_person_seq_id = p.person_seq_id
            and op.open_CONFIG_ITEM_SEQ_ID = ci.CONFIGURATION_ITEM_SEQ_ID
            and t.task_type = 'Change Task'
            and t.state = 'Closed'
            --and sg.search_code = p_target_name
            and ci.environment in ('Production','Development','Staging','QA')
    and OP.EST_ACTUAL_END_DATETIME between to_date('01-Apr-2012,00:00:00','DD-Mon-YYYY,HH24:MI:SS') and to_date('08-Apr-2012,23:59:59','DD-Mon-YYYY,HH24:MI:SS')       
            --and t.LAST_UPDATE_DATE between ??EMIP_BIND_START_DATE?? and ??EMIP_BIND_END_DATE??
    group by ci.environment
    order by 2 desc)
    where rownum < 6;

    Use the rollup group by

  • Using a query to sum in Oracle Forms

    Greedings,

    I have the following query, which works very well in PL/SQL, but I can't make it work in Oracle forms that I get an error in SUM(SELECT...). Any here here on how I should fix my request to work in forms?
    select 
       Sum((SELECT kl.amount
                FROM S03_a_salfldg@oracle_to_sun kl
                WHERE Trim(kl.accnt_code)=Trim(a.acnt_code)
                AND kl.period between 2008001 AND 2008012 AND ROWNUM=1)) AS actual
       from so_budgets_cat a,a01_acnt@oracle_to_sun b,so_budgets_com c,so_budgets d
       where trim(a.acnt_code)=trim(b.acnt_code)
       AND a.cat=c.cat
       AND TRIM(d.acnt_code)=trim(a.acnt_code)
       AND d.business_object=10000103883
       AND d.business_object=c.bus_object
       AND d.business_object=a.business_object
       AND SubStr(d.period,1,4)=Trim(c.PERIOD_Y)
       AND C.period_Y BETWEEN substr(2008001,1,4) AND substr(2008001,1,4)
       GROUP BY a.cat,a.acnt_code,c.com,a.cat_desc,b.descr,d.acnt_code
       order by a.cat,a.acnt_code,c.com,a.cat_desc,b.descr
    Thanks in advance

    Try to move the inline view in the clause of the form.

    François

  • Symbol of the missing sum in column a of the measures

    Hi, I need Sum (∑) by one of the measures, and this column is missing the ∑ symbol. Why would it be? All other columns have ∑.

    Thank you.

    It won't be shown on measure,

    Still one thing that discovers you are using? do you have a screenshot of it?

Maybe you are looking for

  • 3D is cut in two and not focused on Toshiba 55L7453D crosstalk/ghosting

    3D is a little displaced, cut in two, not well centered.It is not comfortable, after 3-5 min. to watch, I have a headache. System No. 2014-052.Latest firmware 8.1.88.07.01.1. MBOOT worm 00813201.Reset after update. But the quality was the same with t

  • OSX Safari Search Bar Workaround 10.11.3

    Confirmed workaround solution After the upgrade to OSX 10.11.3, I found that the Safari search bar was unusable. There is a simple solution; However, it hinders the performance of search. Click Safari > Preferences > search Uncheck the box: include s

  • "Scratch" feature Sports Watch :)

    Hi all! Already 6 months to my 'Sport Watch 42'. I really like it, but there's one thing large 'print to spoil. ION - x glass is a low point in this very good product (I already agreed battery of low capacity and the weakness "to life".) I'm really f

  • Equium L40-10 X - Wlan just unresponsive on Vista

    Hello Did anyone having similar problems with Atheros AR5007EG on Equium L40-10 X wireless card?Laptop with pre-installed Vista, wireless card installed properly, stops just answer with tried several routers in different places (to eliminate interfer

  • DM4-1160US - no sound from the built-in speakers!

    Hello: Last week I stopped suddenly its audience of computer dm4-1160us laptop (Windows 7 Home Premium 64-bit).  A technician myself for over 25 years, I uninstalled, reinstalled, checked the Device Manager for the possible error ratings, updated the