How to use sum analytic function in adf
Hi
jdev 11.1.1.5
oracle 11g r2
I want to use analytic function (sum,count,avg and ...) .
I see [url http://andrejusb.blogspot.co.uk/2013/02/oracle-analytic-functions-for-total-and.html]Oracle Analytic Functions for Total and Average Calculation in ADF BC
and use it in my vo and jsf page,my vo have too much record and I want to have sum in table footer on demand (because of performance) and if user do not want to see the sum in footer of table it do not calculate sum,
what is your idea?
Before I read that blog I use another vo for sum but after that blog decide to use analytic fuction becuase we have some page that have to many dvt graph and table and know we use seperate vo for them and it has not good performance and too many query must run in database ,I want to have 1 vo with some analytic function for graph and tables
Similar Messages
-
Hi,
I am using the SUM analytical function to accumulate some data from one record to the other record (data per month):
TPS_MOI_CODE PRD_PRD_CODE PDV_PDV_CODE RTTCAVCANV
200510 01 9302 -8050
200511 01 9302 -15500
200512 01 9302 -16150
200601 01 9302 -16150
200602 01 9302 -16150
200603 01 9302 -16150
The result is correct. However, I also want to restart the sum from January, i.e every months contain the sum of all the previous month, and it must restart in January.
How do I do that ?
Thanks in advance for your answers.You should extract a year and use it as the partition in over() clause, for example:
SQL> select * from t;
DATE# QTY
200510 1
200511 2
200512 3
200601 4
200602 5
200603 6
6 rows selected.
SQL> desc t;
Name Null? Type
DATE# NUMBER
QTY NUMBER
SQL> select date#, sum(qty) over(partition by substr(date#,1,4) order by date#) cum_sum
2 from t;
DATE# CUM_SUM
200510 1
200511 3
200512 6
200601 4
200602 9
200603 15
6 rows selected.Rgds. -
How to use the set functions effectively in webi ,please let me know with detail
how to use the set functions effectively in webi ,please let me know with detail
Hi,
we use use set functions on heirarchies with aggregate functions mostly .
If you include member_set, Min returns the minimum value of the aggregated data for all members in the member set.
Member_set can include multiple sets separated by semicolons (;).
The list of member sets must be enclosed in {}.
If the member set expression does not specify a precise member or node, the hierarchy referenced must be present in the table, then the member set expression references the current member in the hierarchy in the table. If the hierarchy is not in the table, the function returns the message #MULTIVALUE.
Eg .
1) Ancestor
=Sum([YTD] ; {Ancestor([Test Hierarchy];2)})
2) IsLeaf
=[Test Hierarchy].IsLeaf
You can use this function when you want to show your Measure only at lower level .
3) .Depth
=[Test Hierarchy].Depth
This is also function used with hierarchy to find Level of Members .
Follow this link for PDF reference .
Page 147
https://www.google.co.in/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&cad=rja&ved=0CDIQFjAB&url=https%3A%2F%2Fhelp.sap.com%2Fbusinessobject%2Fproduct_guides%2Fboexir4%2Fen%2Fxi4sp5_ffc_en.pdf&ei=nBAUU-iUM4WWrAeMuoCoDg&usg=AFQjCNHakXsEjd_yUk2y3lVdibf3PXpEOA&bvm=bv.61965928,d.bmk
search on SCN this question was discussed before also one those links .
http://scn.sap.com/thread/3183380
Hope this will help you . -
Problem using SUM standard function during Field Mapping
Hi Experts ,
I am trying to sum all LIFMG 's in in the lineitems of a particular
header and map this result to Lifmg of the header.(Idoc with multiple headers and line item).I am using SUM standard function.
Rough Source structure.
Header1
vbeln
....Lineitem1
vbeln
posnr
......LIFMG
....Lineitem2
vbeln
posnr
......LIFMG
Header2
vbeln
....Lineitem1
vbeln
posnr
......LIFMG
....Lineitem2
vbeln
posnr
......LIFMG
I am able to find the SUM ...but in the target structure's Header field I am getting
repeated value of the corresponding sum in each header ...i.e.
Header1
LFIMG-- 100
LFIMG 100
Header2
LFIMG-- 102
LFIMG 102
How to get a single value for each .
Regards,
DeepakSolved Myself ...
Placed sum after if without else ...
placing it before was causing ...those values to be replicated. -
Can i use an analytic function instead of a group by clause?
Can i use an analytic function instead of a group by clause? Will this help in any performance improvement?
analytic can sometimes avoid scanning the table more than once :
SQL> select ename, sal, (select sum(sal) from emp where deptno=e.deptno) sum from emp e;
ENAME SAL SUM
SMITH 800 10875
ALLEN 1600 9400
WARD 1250 9400
JONES 2975 10875
MARTIN 1250 9400
BLAKE 2850 9400
CLARK 2450 8750
SCOTT 3000 10875
KING 5000 8750
TURNER 1500 9400
ADAMS 1100 10875
JAMES 950 9400
FORD 3000 10875
MILLER 1300 8750
14 rows selected.
Execution Plan
Plan hash value: 3189885365
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 14 | 182 | 3 (0)| 00:00:01 |
| 1 | SORT AGGREGATE | | 1 | 7 | | |
|* 2 | TABLE ACCESS FULL| EMP | 5 | 35 | 3 (0)| 00:00:01 |
| 3 | TABLE ACCESS FULL | EMP | 14 | 182 | 3 (0)| 00:00:01 |
Predicate Information (identified by operation id):
2 - filter("DEPTNO"=:B1)which could be rewritten as
SQL> select ename, sal, sum(sal) over (partition by deptno) sum from emp e;
ENAME SAL SUM
CLARK 2450 8750
KING 5000 8750
MILLER 1300 8750
JONES 2975 10875
FORD 3000 10875
ADAMS 1100 10875
SMITH 800 10875
SCOTT 3000 10875
WARD 1250 9400
TURNER 1500 9400
ALLEN 1600 9400
JAMES 950 9400
BLAKE 2850 9400
MARTIN 1250 9400
14 rows selected.
Execution Plan
Plan hash value: 1776581816
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 14 | 182 | 4 (25)| 00:00:01 |
| 1 | WINDOW SORT | | 14 | 182 | 4 (25)| 00:00:01 |
| 2 | TABLE ACCESS FULL| EMP | 14 | 182 | 3 (0)| 00:00:01 |
---------------------------------------------------------------------------well, there is no group by and no visible performance enhancement in my example, but Oracle7, you must have written the query as :
SQL> select ename, sal, sum from emp e,(select deptno,sum(sal) sum from emp group by deptno) s where e.deptno=s.deptno;
ENAME SAL SUM
SMITH 800 10875
ALLEN 1600 9400
WARD 1250 9400
JONES 2975 10875
MARTIN 1250 9400
BLAKE 2850 9400
CLARK 2450 8750
SCOTT 3000 10875
KING 5000 8750
TURNER 1500 9400
ADAMS 1100 10875
JAMES 950 9400
FORD 3000 10875
MILLER 1300 8750
14 rows selected.
Execution Plan
Plan hash value: 2661063502
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 14 | 546 | 8 (25)| 00:00:01 |
|* 1 | HASH JOIN | | 14 | 546 | 8 (25)| 00:00:01 |
| 2 | VIEW | | 3 | 78 | 4 (25)| 00:00:01 |
| 3 | HASH GROUP BY | | 3 | 21 | 4 (25)| 00:00:01 |
| 4 | TABLE ACCESS FULL| EMP | 14 | 98 | 3 (0)| 00:00:01 |
| 5 | TABLE ACCESS FULL | EMP | 14 | 182 | 3 (0)| 00:00:01 |
-----------------------------------------------------------------------------So maybe it helps -
I am currently away from my MAC and want to send an email through apple mail with the bcc functionality. I am using the cloud to get to my mail, however, I can't figure out how to use the BCC functionality, please help. Thanks!
Open your mail,
lower left corner click on settings,
go to composing and check BCC, save and your done -
How to Use the language function for assignment and validation
Hi All,
If anyone can explain me in details with example ,how to use the language function for assignments and validations?
Thanks
ArnabHi Arnab,
The expression is checked only for the current MDM session.
If u login with the ABC language it will always show the ABC language no matter how many times u execute it.
Try connecting to the DM with the XYZ language.
It should go to the if part rather than else.
Hope it helps.
Thanks,
Minaz -
How to use the CMS functionality in Sun Portal Server 7.2
Hi All,
How to use the CMS functionality using the ccd.war(Portlet) which is available in the library as i could add it to my channel but not able to show the functionality as it is showing the error msg "You are currently not logged in. Please login." should I create userid and there respective roles inorder to use the CMS functionality.
Has any one used this as I could this in glass fish server.
Any Input is appreciated.
Thanks & regards
SrikanthHave a look at the "*Roles*" section of the portal server 7.2 content management system guide
http://docs.sun.com/source/820-4275/index.html . You can also look at [project mirage|https://mirage.dev.java.net] for some screencasts
Alternatively,
1. ccd.war has 3 portlets in it:
(a) custom content definition portlet
(b) custom content portlet
(c) workflow portlet
2. Inorder to work with these portlets, user needs to be in anyone of the below roles:
(a)Consumer (b) Editor (c) Approver (d) Administrator (e) Submitter (f) Contributor (g) Publisher
3. By default ccd.war gets deployed using a default roles file (/var/opt/SUNWportal/tmp/ccd.roles.properties)
Note: In windows, you may not find this file
4. Access the portlets as a user in any of the role mentioned in the ccd.roles.properties
(OR)
you can use a new roles file which has mapping to your custom roles. For this , undeploy existing ccd.war and deploy again with a new roles.properties file
Hope this helps! -
How to use the divide() function in bpel
Hi All,
How to use the divide() function in bpel.
pls can u give the one sample example2 div 4
Eg;
<assign name="Assign_1">
<copy>
<from expression="2 div 4"/>
<to variable="outputVariable" part="payload"
query="/client:testProcessResponse/client:result"/>
</copy>
</assign>
--Prasanna -
How to use xsl document() function with LiveCycle XSLT processor
Hello,
I would like to use LiveCycle XSLT processor to merge xml documents by using the xsl document() function.
However, I have not, yet, found clear reference information on the specifics of how to accomplish in LC. For instance if you have
a transformation that does merging using a standalone xml editor (such as Oxygen), than what is required to accomplish the same
using the LiveCycle XSLT service. How do you specify the URI of the XML document that is specified as an input in the xsl document() function. Your insight is appreciated. RegardsHello Steve,
I checked the reference that you cited (XSLT Transformation). The reference omits discussing how to use xlst document() function within a stylesheet. I think that probably means that feature of xslt technology is not directly available through LiveCycle. When I find a workaround, I'll post an update...for the user community that might encounter the same issue. Thank you for your response and insight. Regards, jb1809 -
How to use query-database() function in transformation?
Hi All,
How to use query-database() function in transformation?
It is giving four fields but if i write select query in sqlquery field it is saying select node is not found....
plz help me out
Regards
Pavankumar
Edited by: [email protected] on Jul 29, 2009 2:49 AMHi,
To answer your query:-
http://abhishek-soablog.blogspot.com/2008/08/orclquery-database.html
Cheers,
Abhi... -
How to use Round off function in TAX Formula
Dear All,
I have to do Round off in the Tax Formula. Hence I was suggested by the SAP Forum Team to use Round off function in the Tax Formulae.
But sir I don't know how to use Round off function in the Tax Formulae.
For Eg. BaseAmt = Total
TaxAmt = BaseAmt * Rate
Now within this Eg. How will i use the Round off function and where i will use it.
Please guide me with example.
Regards
Hitesh ParsawalaHi Hitesh,
you can do like this
Cess_ST_TaxAmt=Round(Cess_ST_BaseAmt*Cess_ST_Rate,0)
where you can introduce rounding function by choosing from dropdown available in Operation and by click on Insert.
It will post following in formulla window
Round (Number, Decimals as Number)
where in parameter you have to give 1.Number-which is to be round and 2.Decimals as Number-as per your requirement like by 2 decimal or 0 decimal
If required give me call,
BR
Samir Gandhi -
How to use Spell-check functionality for textbox (like Orkut, gtalk)
How to use Spell-check functionality for tex Hello Friends,
I am working on a JSP application. I wanted to add Spell check for text box like we have here, when we post a message. It automatically shows red line under the word, when ever spelling is wrong. Please tell me how I can do this. If possible, the code too.
Thanks.I believe the spell checking you see here, or on any other site, is the spell checking built into Firefox. At least that's what I see. Are you using Firefox?
-
How to use a C function as a native method
Could anybody tell me how to use a C function as a Java native method.
ThanksRead all about it.
You'd probably have to write a little wrapper (using JNI) that passes
parameters and return values around between your C function and
the JVM.
kind regards,
Jos -
How to use a partner function?
1. I would like to link a project (or WBS) to the Invoice Approver (for the workflow)
2. I would like to link a project to a Customer or several Customers
3. I would like to link a project to a Vendor or number of Vendors
Not clear how to use a partner function for that reason and where this will be visible.Getting following error message for the Customer:
Customer for function Y2 may not have account group Z010
Message no. VP303
Why and where such restrictions are applied?
Maybe you are looking for
-
IPhone using cellular network to transmit/receive data even while on Wi-Fi
I have recently noticed a strange problem with my 15 month-old 3GS. Although my phone sits at home most of time time and is constantly connected to my wi-fi network, it is still using the AT&T network to send and receive some data. I can see this by
-
Now, according to Apple, 10.5 with be totally 64-bit, which, I suspect will be a problem with G4 users as this PPC processor is a 32-bit processor (and not 64-bit). I was wondering what Apple will be doing about this ? With G4 users just have to 'mak
-
Hello people, I am fairly new to the apple community and i am facing a problem. its been a whole week since i am trying to figure out how to stream video on my new bravia over the network. I ve even replaced my router last night. Equipment: Mac Pro -
-
Powerpoint Sildes to Go. Notes cannot be edited
Tried to use this app for a business meeting and noticed a few glaring ommissions 1) When views the notes you only see 3 lines 2) You cannot edit the notes 3) when I Tilt the PB I expect the format to change so I can see more notes.
-
Safari doesn't support iFrames????
I went on the Black and Decker website to register a new tool and I was told I could not because my browser didn't recognize iFrames. I have no idea what iFrames are and why Safari doesn't work. I did get on the site using FireFox. Tried a second tim