Total amount of the purchase amount

Hello

In oracle EBS 11.5.9, I need to get the corresponding field in the table of the purchase order request IE
Purchase buyer-> good summary-> order Total amount.

or order form header-> quantity.

What field in the table, I can retrieve this data. ?

Is - this PO_header_all or any summation of the fields of po_lines_all?

Just reply in this regard?

The total price to the header is calculated from price_override * amount of po_line_locations_all.

Hope that answers your question,
Sandeep Gandhi

Tags: Oracle Applications

Similar Questions

  • How everyone counts the total amount of GHz for virtual machines on a host-cluster?

    Hello

    I want to do some basic sizing and I may\may do not go the way to write about it.  For example, suppose I have a cluster of 4 nodes with a total of 200GHz and 1 TB of RAM on all four hosts with 100 VM.  How can I get the total amount of GHz\Memory that each virtual machine is configured with (not necessaryly to aid real-time) so that I can workout or demonstrate what fits on one or two hosts in the cluster, for example?

    Thanks for your help and advice in advance

    You can do this via the inventory tool called RVTOOL which allow you to do an inventory of all your virtual machines and hosts with the resource assigned and served. hope, it will help you.

  • Can I use the total amount of resources (cpu/ram) of two esxi hosts if I place a cluster so that a single VM gets all resources?

    I use vCenter 5.1 with two esxi 5 guests, both exactly the same (Evga SR - 2 pc with two Intel x 5670 each) with the exception of the disk storage. Processor x 5670 a 12 hearts if HT is enabled. Since then, I have 4 of these processors that would be 48 cores. Each processor is clocked at 4 GHz for a total of 16 GHz. Each host would also 24GO of total Yes 48 GB of ram.

    I doubt that this is possible, but what I want to do is to install a virtual machine like Win 7 x 64 and give all these resources to it... all of them (perhaps leave some carrots and ram aside for guests of esxi, of course). This vm is run to 16 GHz? It would be nice if we could create a cluster with a Setup like this and give the "total available resources' for a single virtual machine running on a esxi host.

    I doubt that this is possible because I've tried that before and it wouldn't let me create a virtual machine with this number of nuclei or ram because he said that they were not available or something... as if to suggest that I can only use the total amount of resources to AN esxi host.

    There may be another way I could give this 16 GHz machine?

    Could not assign more resources to a host to a virtual computer.

  • Total amount of storage in the data center

    I'm trying to get a script that will give me the whole total amount of space used in a data center. I want to launch against the center of data from virtual centres. There is a total of approximately 1900 of virtual machines and virtual machine is distributed among several LUNS. I need to get the overall figure for a migration.

    PS: I want to get the numbers in GB instead of megabytes and I also want it spits out a report in .csv on my local machine (c:\scripts\xxxx.csv)



    Thank you guys.

    I'm afraid that it won't work by changing just the data center-Get Get-cluster.

    The reason is the cmdlet Get-data store later in the script, on the location setting it only accepts the data center objects, folder and DatastoreCluster.

    But with a little small change, we can get it to work for clusters as well.

    Get-Cluster | Select Name,@{N="Storage Used (GB)";E={  $sum = Get-Datastore -RelatedObject (Get-VMHost -Location $_) |   where {$_.ExtensionData.Summary.MultipleHostAccess -and $_.Type -eq "VMFS"} |  Measure-Object -Property CapacityGB,FreeSpaceGB -Sum  [Math]::Round($sum[0].Sum - $sum[1].Sum,2)}} |Export-Csv c:\scrpits\xxxxx.csv -NoTypeInformation -UseCulture
    
  • Script to count total amount of memory allocated to the VM on each ESX host

    Hello

    I'm looking for a script to add all the RAM allocated to virtual machines per ESX host in vCenter.

    I can quite easily show the MemoryUsageMB and the MemoryTotalMB, but I would like to get the total amount of memory assigned to VM-based host?

    Any help would be appreciated.

    Thank you

    Ben

    Try something like this

    Get-VMhost |Select Name,@{N="Memory used MB";E={  $_ | Get-VM | %{$_.ExtensionData.Summary.QuickStats.HostMemoryUsage} |  Measure-Object -Sum | Select -ExpandProperty Sum}}
    
  • help create dynamic measures to calculate the total amount in the form of tabluar

    Hello world

    We using apex 4.2 and start re-writing some existing applications originally designed in 3.0.   I was wondering if someone could help me with the following scenario.

    I have a tabular presentation several recording based on a collection called "species_collection".  The form allows fisherman to create an electronic ticket which contains one species, quantity, price, total of the amounts and other descriptive information on the species.  I created a dynamic action (with lots of help from this forum) to automatically update the collection when a field is changed.

    I am now in the hope of creating a dynamic action that will automatically do the following:

    • When the quantity is changed, recalculate the total of the amounts as quantity * price
    • When the price is changed, recalculate the total of the amounts as quantity * price
    • When dollars changed, recalculate the $ amount/total price.
    • When the total amount is changed, recalculate the OVERALL TOTAL

    Currently, I use embedded calls to javascript and then to application processes... but they are difficult to debug, and it seems that dynamic action could be cleaner and simpler.

    the current request is (I've included the concerned fields because it is an important application):

    SELECT
    apex_item.text(1,seq_id,'','','id="f01_'||seq_id,'','') "DeleteRow",
    seq_id,
    seq_id display_seq_id,
    .....
    apex_item.text(10,TO_NUMBER(c010),5,null, 'onchange="setTotal('||seq_id||')"','f10_'||seq_id,'') Quantity,
     
    apex_item.text(11,TO_NUMBER(c011),5,null,'onchange="getPriceBoundaries('||seq_id||')"','f11_'||seq_id,'') Price,
    
    apex_item.text(12, TO_NUMBER(c012),5,null, 'onchange="changePrice
    ('||seq_id||')" onKeyDown="selectDollarsFocus('||seq_id||',event);"','f12_'||seq_id,'') Dollars
     ......
    from apex_collections
     where collection_name = 'SPECIES_COLLECTION' order by seq_id 
    

    each field, QUANTITY, PRICE, $ has an ONCHANGE that then call the application processes that update the collection.

    <script language="JavaScript1.1" type="text/javascript">
    
    function setTotal(row)
    {
       //quantity was entered into form, get values
       var price = $x('f11_'+row);
       var total = $x('f12_'+row);
       var quantity = $x('f10_'+row);
       var nquantity = parseFloat(quantity.value);
       var ntotal;
       var nprice;
       nquantity = nquantity.toFixed(3);
       quantity.value = nquantity;
       //if quantity and price both have values calculate total and save
       if(quantity.value > 0 && price.value > 0)
       {
          ntotal = quantity.value * price.value;
          total.value = ntotal.toFixed(2);
       }
       else
       {
             //if quantity and total both have values calculate price and save
          if(quantity.value > 0 && total.value > 0)
          {
             nprice = total.value/quantity.value;
             price.value = nprice.toFixed(6);
             //check to see if the price entered falls within min/max for that species
             var get = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=PriceBoard',0);
             get.add('SPECIESPRICE',price.value);
             get.add('SEQUENCEID',row);
             gReturn = get.get();
             if ((gReturn == 'Price entered is too high') || (gReturn == 'Price entered is too low')){alert(gReturn);}
          }
          else  if (quantity.value > 0)
                   total.value = '';
                else
                { 
                     total.value = '';
                     quantity.value = '';
                }
       }
      //saveQPD(row);
       setOverallTotal(); 
    }
    function setOverallTotal()
    {
       var total = 0;
       var nTotal;
       for(i=1;i<=rowCount;i++)
       {
          if(parseFloat($x('f12_'+i).value) > 0)
          {
             total = total + parseFloat($x('f12_'+i).value);
          }
       }
       ntotal = total.toFixed(2);
       document.getElementById("P110_TOTAL").value = ntotal;
       var get = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=nullProcess',0);
       get.add('P110_TOTAL',ntotal);
       gReturn = get.get();
    }
    function getPriceBoundaries(row) 
    {
       //price was entered into form get all values
       var quantity = $x('f10_'+row);
       var price = $x('f11_'+row);
       var total = $x('f12_'+row);
       var ntotal;
       var nquantity;
       var nprice = parseFloat(price.value);
       nprice = nprice.toFixed(6);
       price.value = nprice;
       //check to see if the price entered falls within min/max for that species
       var get = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=PriceBoard',0);
       get.add('SPECIESPRICE',price.value);
       get.add('SEQUENCEID',row);
       gReturn = get.get();
       if ((gReturn == 'Price entered is too high') || (gReturn == 'Price entered is too low')){alert(gReturn);}
       //if quantity and price both have a value calculate the total
       if(quantity.value > 0 && price.value > 0)
       {
          ntotal = quantity.value * price.value;
          total.value = ntotal.toFixed(2);
       }
       else
       {
          //if total and price both have a value calculate the quantity
          if(total.value > 0 && price.value > 0)
          {
             nquantity = total.value/price.value;
             quantity.value = nquantity.toFixed(3);
          }
          else
          {
             if(price.value > 0)
                  total.value = '';
             else
             {
                  total.value = '';
                  price.value = '';
             }
          }
       }
       saveQPD(row);
       setOverallTotal();
    }
    function saveQPD(row)
    {
       var quantity = $x('f10_'+row).value;
       var price = $x('f11_'+row).value;
       var total = $x('f12_'+row).value;
       //save quantity
       var get = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=setQuantity',0);
       get.add('SETVALUE',quantity);
       get.add('SEQUENCEID',row);
       gReturn = get.get();
    //   alert(gReturn);
       //save price
       get = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=setPrice',0);
       get.add('SETVALUE',price);
       get.add('SEQUENCEID',row);
       gReturn = get.get();
    //   alert(gReturn);
       //save total
       var get = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=setTotal',0);
       get.add('SETVALUE',total);
       get.add('SEQUENCEID',row);
       gReturn = get.get();
    //   alert(gReturn);
       
    }
    function changePrice(row)
    {
       //total was entered get all rows
       var quantity = $x('f10_'+row);
       var price = $x('f11_'+row);
       var total = $x('f12_'+row);  
       var ntotal = parseFloat(total.value);   
       var nprice;
       var nquantity;
       ntotal = ntotal.toFixed(2);
       total.value = ntotal;
       //if quantity and total were entered calculate price.
       if (quantity.value > 0 && total.value > 0)
       {
          nprice = total.value / quantity.value; 
          price.value = nprice.toFixed(6); 
          var get = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=PriceBoard',0);
          get.add('SPECIESPRICE',price.value);
          get.add('SEQUENCEID',row);
          gReturn = get.get();
             if ((gReturn == 'Price entered is too high') || (gReturn == 'Price entered is too low')){alert(gReturn);} 
       }
       //if price and total were entered calculate quantity.
       if (price.value > 0 && total.value > 0)
       {
          nquantity = total.value / price.value;  
          quantity.value = nquantity.toFixed(3);
       }
       if (price.value > 0 && quantity.value > 0)
       {
           ntotal = quantity.value * price.value;
           total.value = ntotal.toFixed(2);
       }
     
           
       saveQPD(row);
       setOverallTotal();        
    }
    
    function selectDollarsFocus(pRow,event)
    {
        tabPress = 0;
        KeyCheck(event);
        if($x('f11_'+ pRow))
        {
                if(KeyID == 9)
                {
                    $x('f14_'+ pRow).focus();
                    onFocusAreaFished(pRow);
                    tabPress = 1;
                }
        }
        else
        {
            if($x('f18_'+ pRow))
            {
                    if(KeyID == 9)
                    {
                        $x('f18_'+ pRow).focus();
                        tabPress = 1;
                    }
            }
            else
            {
                if(--pRow <= rowCount)
                    if(KeyID == 9)
                    {
                        $x('f08_'+ pRow).focus();
                        tabPress = 1;
                    }
            }
            
        }
    }
    
    
    
    </script>
    

    I'm not very familiar with javascript... but looks like there must be a simpler way.   Any thoughts on how I could address the issue?   Thank you!

    I have it.  trial and error.

    the DYNAMICS of the evolution of prices and the $ action are now two separate dynamic actions.

    Action DYNAMICS to update the column from the collection is now last... and it seems that everything works... until I have change something again.

    Thanks again for your help.

    Karen

  • I have a total of cells which can go up to any amount.  I also have a Grand total of cells using the total amount of cells, BUT it must be a total which is &lt; = 20

    I have a total of cells which can go up to any amount. I also have a GRAND total of cells using the total amount of cells, BUT it must be a total which is < = 20.  So in other words. He TOTAL = 31 total can only = 20.   If the TOTAL = 8 total would equal 8.

    Thank you!

    Custom calculation script for "GRAND total":

    var total = + this.getField ("TOTAL") .value;

    Event.Value = Math.min (total: 20);

  • Total amount, but not the Total number of ranking

    Morning all,

    I'm trying to rank user name based on the total sum of the waived amount but I want to avoid the Total general ranking at the bottom, more I don't want their order of ranking, I want the order remains the same, as it is currently.
    SELECT DECODE(GROUPING(USERNAME),1,'TOTAL',0,UPPER(USERNAME)) as "USERNAME", 
           SUM(CASE WHEN TO_CHAR(DATE_PROCESSED,'MON') = 'JAN' THEN AMOUNT_WAIVED ELSE 0 END) AS JAN,
           SUM(CASE WHEN TO_CHAR(DATE_PROCESSED,'MON') = 'FEB' THEN AMOUNT_WAIVED ELSE 0 END) AS FEB,
           SUM(CASE WHEN TO_CHAR(DATE_PROCESSED,'MON') = 'MAR' THEN AMOUNT_WAIVED ELSE 0 END) AS MAR,
           SUM(CASE WHEN TO_CHAR(DATE_PROCESSED,'MON') = 'APR' THEN AMOUNT_WAIVED ELSE 0 END) AS APR,
           SUM(CASE WHEN TO_CHAR(DATE_PROCESSED,'MON') = 'MAY' THEN AMOUNT_WAIVED ELSE 0 END) AS MAY,
           SUM(CASE WHEN TO_CHAR(DATE_PROCESSED,'MON') = 'JUN' THEN AMOUNT_WAIVED ELSE 0 END) AS JUN,
           SUM(CASE WHEN TO_CHAR(DATE_PROCESSED,'MON') = 'JUL' THEN AMOUNT_WAIVED ELSE 0 END) AS JUL,
           SUM(CASE WHEN TO_CHAR(DATE_PROCESSED,'MON') = 'AUG' THEN AMOUNT_WAIVED ELSE 0 END) AS AUG,
           SUM(CASE WHEN TO_CHAR(DATE_PROCESSED,'MON') = 'SEP' THEN AMOUNT_WAIVED ELSE 0 END) AS SEP,
           SUM(CASE WHEN TO_CHAR(DATE_PROCESSED,'MON') = 'OCT' THEN AMOUNT_WAIVED ELSE 0 END) AS OCT,
           SUM(CASE WHEN TO_CHAR(DATE_PROCESSED,'MON') = 'NOV' THEN AMOUNT_WAIVED ELSE 0 END) AS NOV,
           SUM(CASE WHEN TO_CHAR(DATE_PROCESSED,'MON') = 'DEC' THEN AMOUNT_WAIVED ELSE 0 END) AS DEC,
           SUM(AMOUNT_WAIVED) AS "TOTAL"       
    FROM A3_FACT_AMS_WAIVED_ARREARS
    WHERE TO_CHAR(DATE_PROCESSED,'YYYY')='2012'
    GROUP BY ROLLUP (USERNAME)
    USERNAME     JAN     FEB     MAR     APR     MAY     JUN     JUL     AUG     SEP     OCT     NOV     DEC     TOTAL
    AARKOVITS     0     6.5     39     0     39     0     32.5     6.5     6.5     0     0     0     130     
    ABINGE     52     0     0     19.5     19.5     39     78     234     0     0     0     0     442     
    ACOUGHLIN     0     0     9.75     6.5     39     21.68     0     26     6.5     0     0     0     109.43     
    BFOSTER     39     0     26     0     0     0     19.5     6.5     0     0     0     0     91     
    BWOOLLARD     0     0     0     0     6.5     0     0     0     0     0     0     0     6.5     
    CCHAPMAN     0     0     0     0     0     260     13     19.5     39     0     0     0     331.5     
    CLAW     0     13     0     0     0     0     0     0     0     0     0     0     13     
    CROBSON     0     32.5     0     0     0     0     0     0     0     0     0     0     32.5     
    EATMORE     71.5     13     26     39     0     0     13     0     0     0     0     0     162.5     
    EMORRIS     0     0     0     0     0     13     97.5     13     0     0     0     0     123.5     
    EPENNINGTON     0     0     0     0     0     0     13     13     0     0     0     0     26     
    EROLLASON     0     0     19.5     52     0     0     0     0     0     0     0     0     71.5     
    EWATKINSON     0     19.5     13     32.5     0     0     0     0     0     0     0     0     65     
    FSEYMOUR     32.5     100     19.5     0     61.4     0     0     0     0     0     0     0     213.4     
    GTYSON     0     32.5     0     91.75     6.5     0     0     149.5     0     0     0     0     280.25     
    HMACKENZIE     0     0     0     39     0     0     0     19.5     0     0     0     0     58.5     
    HTILFORD     0     0     0     19.5     13     19.5     0     71.5     0     0     0     0     123.5     
    IRYDER     0     0     0     0     0     0     0     50.87     74.64     0     0     0     125.51     
    JASHTON     0     6.5     13     39     0     0     46.5     13     0     0     0     0     118     
    JCOOPER     39.1     97.5     40.5     147.78     26     0     6.5     26     0     0     0     0     383.38     
    JCOUGHLIN     0     0     13     0     0     0     13     0     0     0     0     0     26     
    JHUDSON     0     0     58.5     0     0     0     0     0     0     0     0     0     58.5     
    JLEARMONTH     0     45.5     73     32.5     78     45.5     0     0     0     0     0     0     274.5     
    JPARKER     0     0     6.5     39     6.5     0     0     0     0     0     0     0     52     
    JPOULTER     0     0     0     0     0     58.5     0     0     0     0     0     0     58.5     
    JRUTHERFORD     0     0     0     0     0     0     26     0     0     0     0     0     26     
    JWILSON     0     0     13     26     0     0     6.5     0     0     0     0     0     45.5     
    KCLEMISHAW     0     0     0     6.5     6.5     0     0     0     0     0     0     0     13     
    KCOOK     0     0     0     13     0     0     13     0     0     0     0     0     26     
    KSMITH     0     0     0     0     0     0     0     6.5     0     0     0     0     6.5     
    KSYKES     0     0     13     0     0     0     0     0     13     0     0     0     26     
    LMUSGROVE     0     0     0     0     0     0     40.5     0     0     0     0     0     40.5     
    LPRINGLE     0     0     6.5     0     0     6.5     0     26     0     0     0     0     39     
    LSANFORD-KARLSSON     0     0     0     19.5     0     45.5     6.5     0     0     0     0     0     71.5     
    LUNWIN     0     0     0     0     0     39     0     6.5     0     0     0     0     45.5     
    MBELL     0     0     0     0     0     6.5     0     0     0     0     0     0     6.5     
    MBELLERBY     0     6.5     0     1.43     0     0     0     0     0     0     0     0     7.93     
    MFOUNTAIN     56.5     31.5     2.46     1.25     149.5     0     0     0     0     0     0     0     241.21     
    MJONES     0     0     0     123.5     0     0     0     0     0     0     0     0     123.5     
    MWILSON     0     0     0     0     13     0     0     0     0     0     0     0     13     
    NDEIGHTON1     0     78.18     78.08     0     0     78     143     78     0     0     0     0     455.26     
    NLDEIGHTON     0     0     0     0     0     0     0     21     0     0     0     0     21     
    NLIMBERT     117     45.5     0     0     0     0     0     130     0     0     0     0     292.5     
    OFRANKSPEDRICK     0     0     0     0     32.5     0     0     0     0     0     0     0     32.5     
    PDUFFY     0     130     149.5     162.5     0     227.5     240.5     175.5     26     0     0     0     1111.5     
    RBELL     0     26     26     13     0     26     39     0     0     0     0     0     130     
    RBIRCH     0     0     0     13     208     0     0     0     0     0     0     0     221     
    RGLYNN     0     0     13     0     6.5     0     13     19.5     0     0     0     0     52     
    RSANDERS     0     18.42     19.5     0     6.5     27.5     0     45.5     0     0     0     0     117.42     
    RTHOMPSON     84.17     108.06     152.5     41.17     84.5     51.58     54.16     63.94     0     0     0     0     640.08     
    SANDREWS     19.5     0     0     0     26     39     0     0     0     0     0     0     84.5     
    SDEMAINE     0     0     26     0     0     0     0     0     0     0     0     0     26     
    SDOWSON     0     6.5     0     0     6.5     0     26.06     0     0     0     0     0     39.06     
    SHARRIS     0     6.5     0     0     0     0     0     0     0     0     0     0     6.5     
    SMARSHALL     39     0     0     0     0     0     6.5     0     0     0     0     0     45.5     
    SSIMPSON     0     0     0     0     0     19.5     0     0     0     0     0     0     19.5     
    STEER     0     13     19.5     13     13     19.5     0     0     0     0     0     0     78     
    STOMLINSON     0     0     45.5     43.5     0     39     13     0     30.5     0     0     0     171.5     
    STYERS     0     0     0     0     0     0     0     6.5     0     0     0     0     6.5     
    TSOLLITT     0     84.5     12.5     19.5     39     0     78     52     0     0     0     0     285.5     
    WTASSELLI     0     0     65     0     0     0     39     91     0     0     0     0     195     
    ZDUTOIT     0     13     0     0     26     1.5     19.5     0     0     0     0     0     60     
    TOTAL     550.27     934.16     999.29     1054.88     912.9     1083.76     1096.72     1370.81     196.14     0     0     0     8198.93     

    Here's a way to do it:

    SQL> select decode(grouping(e.job),1,'Total',e.job) as job
      2       , sum(case when e.deptno < 20 then e.sal else 0 end) as col1
      3       , sum(case when e.deptno = 20 then e.sal else 0 end) as col2
      4       , sum(case when e.deptno > 20 then e.sal else 0 end) as col3
      5       , sum(e.sal) as total
      6       , decode(
      7            grouping(e.job),0,
      8            rank() over (
      9                 order by
     10                 decode(grouping(e.job),0,sum(e.sal)) desc nulls last
     11            )
     12         ) as rnk
     13    from scott.emp e
     14   group by rollup(e.job)
     15   order by grouping(e.job)
     16          , e.job
     17  /
    
    JOB             COL1       COL2       COL3      TOTAL        RNK
    --------- ---------- ---------- ---------- ---------- ----------
    ANALYST            0       6000          0       6000          2
    CLERK           1300       1900        950       4150          5
    MANAGER         2450       2975       2850       8275          1
    PRESIDENT       5000          0          0       5000          4
    SALESMAN           0          0       5600       5600          3
    Total           8750      10875       9400      29025
    

    Example using SCOTT. As I don't have your table, but you should be able to use the technique in your own case ;-) of EMP table

    PS:

    Your own example does not include an ORDER BY clause. A GROUP BY clause does not guarantee it will be ranked in the order of the columns in the GROUP BY - you can only be sure of the order if you have an ORDER BY. You could review your other code for the GROUP BY without ORDER BY case ;-)

  • Total amount and are rotating back in the same set of results

    I want to return a set of results in the following format:
    YEARMONTH Total ModelA ModelB ModelC
    200101    0     0      0      0
    200102    10    5      5      0
    200103    8     2      2      4
    where the total amount is the sum of the hours for all types of models grouped by yearmonth and columns of each model are the sum of hours per type of model grouped by yearmonth. I can get the correct results with the following query selects nested:
            select distinct yearmonth,
         sum(a.hours) as Total,
         (select sum(b.hours) from model_hours b
             where model = 'ModelA' and a.yearmonth = b.yearmonth) as ModelA,
            (select sum(b.hours) from model_hours b
             where model = 'ModelB' and a.yearmonth = b.yearmonth) as ModelB,
            (select sum(b.hours) from model_hours b
             where model = 'ModelC' and a.yearmonth = b.yearmonth) as ModelC
        from model_hours a
        group by yearmonth
        order by yearmonth
    I was curious to try use the pivot function in Oracle 11 to get the same results and I am able to get all the results, EXCEPT the total number of hours by using the following query:
        select * from (
             select yearmonth, hours, model
             from model_hours a
        )
        pivot
        ( 
             sum(hours)
             for model in ('ModelA', 'ModelB', 'ModelC')
        )
        order by yearmonth
    which returns this result:
    YEARMONTH  ModelA ModelB ModelC
    200101     0      0      0
    200102     5      5      0
    200103     2      2      4
    I was not able to understand how to get the sum of hours for all models, grouped by yearmonth, in this result set also. Is this possible? And if yes, isn't - that's likely to be more effective than selects it nested? This particular table has some 200K lines right now.

    Hello

    As far as I know, the Oracle 11 SELECT... PIVOT function only works on mutually exclusive groups.
    You can derive the total revolving data, like this:

    WITH        pivoted_data          AS
    (
         select  *
         from      (
                           select  yearmonth, hours, model
                    from    model_hours a
                  )
             pivot
              (
                      sum(hours)
                      for model in ( 'ModelA'     AS modela
                                   , 'ModelB'     AS modelb
                         , 'ModelC'     AS modelc
                         )
                  )
    )
    SELECT       yearmonth
    ,       modela + modelb + modelc     AS totla     -- may need chnaging if values can be NULL
    ,       modela, modelb, modec
    FROM       pivoted_data
    ORDER BY  yearmonth
    ;
    

    Published by: Frank Kulash, 26 March 2012 15:01

  • Problem with the total amount of in.

    Hi people,

    I developed a report on the orders (po) buying and at the level of the line, I took po_amount IE
    po_amount = line_qty * unit_price, but this isn't the total amount, I need.

    Here I should consider taxes, then localized i.e. him total amount = taxes * po_amount that the above would be my total and these depend on the currency_code for example :-USD or INR, and for each line-in. There is an amount of tax.

    Without manipulating my custom query (I won't bother him), through discoverer can I write a pl/sql function for the column of taxes and perform a calculation using this function and add an additional column that shows the total amount for me.

    Is this possible? If yes how can we do? any1 can explain briefly.

    Thank you
    Kind regards
    Murielle.

    Hello

    When you create calculation make sure you select the function in the list of available features and then select the po_line_id in the list of available items. If you type just the function and element in the calculation box it probably won't work.

    Rod West

  • Average for a quarter and the grand total amount

    Hi all

    I have a report (PivotTable) in which I view information about sales. I have category, subcategory in the rows. Quarter of the year in the columns. Sales are loaded at the day level in the fact table. My report must indicate the average quarterly sales. That is to say that all sales per month should be added to the top and sales 3 months should be on average to get the average of quarterly sales.  We must show the total sales for each category sub. We must also show the % of sales for each subcategory with a category.

    I did the following,

    1. the aggregation of the column in the SPR Sales is basically

    2. in the report, I shot months in the criteria and which excluded the pivot

    3. I changed the aggregation (for total rum) for the SUM of criteria-> the column formula

    4. I changed the AVG aggregation to view measures pivot

    5. I have reproduced the measure to display the percentage of its sales

    6. I enabled total in the lines.

    Everything works well except the value of the subtotal of sales which gives me the average of subcategories at the level of the category, instead of this, it must be a sum.  The % of total is correct where he gives 100% for each category

    Please help me reach the sum to the total sub level

    Thank you!

    Concerning

    Deepak

    Hey, I just fixed the problem myself.  The solution was to write the formula as AVG (sales per quarter, category, subcategory), then change the rule of the aggregation in short.

  • HP 15-r210dx: total amount of memory that can be added

    Hello

    I just bought a new laptop from HP 15 - r210dx with 6 GB of ram installed (original), I also use 8.1 Pro Win.

    1 can someone tell me what that the total amount of memory that can be added to this laptop?

    8Gigs

    Manual - Page 4

    If you found my answer helpful please say thank you by clicking the s cursor Up icon. Thank you!

  • Total amount

    Someone guide me how can I complete this task.

    I have the below three fields

    (1) amount
    (2) unit price
    (3) amount

    I want to calculate the total amount
    Quantity * Unit_price
    I'm using forms reports 6i
    How can I do this?
    Concerning

    Shareef,

    Create a formula in this writing and filed.

    RETURN NVL(:QUANTITY, 0) * NVL(:UNIT_PRICE, 0);
    

    And set the element to this column of formulas in the report.

    Or you can use it directly in the SQL report.

    SELECT ......., NVL(QUANTITY, 0) * NVL(UNIT_PRICE, 0) TOTAL_AMOUNT FROM ........ WHERE ..
    

    Kind regards

    Manu.

  • How to display only the total value in the upper part of the chart stacked

    Hi all

    I need to display only the total value at the top of the stacked chart in the report of obiee 11g. Can someone help me on this please.

    Thank you

    Hello

    Will be a little different approach suit you like the below a? Total for a day is displayed next to the attribute of the day. Here, the "daily amount" is also an attribute instead of a measure.

  • My credit card was charged but I can't download the purchased software.

    My credit card was charged at 09:32 amounting to RM1860. But I can't download the purchased software. And I do not have a tracking number. Help, please.

    After you contact adobe by CAT, problem solved. Thank you.

Maybe you are looking for

  • NB200 Disabling USB Sleep & Charge

    I have a Toshiba NB200 last month and I noticed that the battery itself reject about 70 percent in two days, if it is not used. I found this forum by searching on this problem and found the following thread. http://forums.computers.Toshiba-Europe.com

  • How can I control a .vi another State machine?

    I've written a VI which is an event focused on the state machine.  Events are operator actions that take place on closing buttons on the front panel.  Each event features one or more state names on the queue of the State.  A state machine then takes

  • Sound and devices Audio Panel indicates "no audio device", the command.

    No speaker in the status bar icon.  With the help of XP, SP3.   Occurred after reinstalling XP.  Use of motherboard ASUS with integrated Realtek.  Realtek version 5.10.0.5793 appears in the Add/Remove list, but not in the list of device management (s

  • x131e how to remove the Equalization function audio lenovo is preloaded windows 8

    Hello world! I recently bought a lenovo thinkpad x131e and after using it for a few weeks, I realized that the audio is being equalization in all programs to maintain a volume level. Usually, I'd be able to access the tab of development on the proper

  • Error 1925

    you have enough priveliegies to install software