Average getting calculated incorrectly using group by grouping sets

Hi All
I am using the group by grouping sets to calulate the running totals of aggregate functions like count, sum & avg.
I get the grand totals of count & sum perfectly right but with avg i am getting the averages incorrectly as the number of rows retrieved by the select query increases.
With few rows (3-4) the averages are round about correct but when the number of rows retreived increase say 5 or more than 5 I get absurd average figures
Here is the query I am using
<code>
select AGENT.NAME,
     sum(decode(ACTIVITY.status,'New',1)) cnt,
               sum(decode(ACTIVITY.status,'Open',1)) sumopen ,
     round(avg( decode (ACTIVITY.status,'Open',ACTIVITY.STATUS_DIFF)),0) avgopen,
          sum(decode(ACTIVITY.status,'Sent',1)) sumsent,
     round(avg( decode (ACTIVITY.status,'Sent',ACTIVITY.STATUS_DIFF)),0) avgsent,
               sum(decode(ACTIVITY.status,'Dead',1)) sumdead,
     round(avg( decode (ACTIVITY.status,'Dead',ACTIVITY.STATUS_DIFF)),0) avgdead
               from ACTIVITY, REQUEST , AGENT
               where
               REQUEST.DEALER_NUMBER = AGENT.DEALER_ID
               and REQUEST.CONFIRMATION='Y'
               and REQUEST.REQUEST_ID = ACTIVITY.REQUEST_ID
               and REQUEST.REQUEST_TYPE='B'
               and ACTIVITY.ACTIVITY_DATE between to_date('2006-01-01 ','YYYY-MM-DD') and to_date('2006-08-31','YYYY-MM-DD')
               group by grouping sets((AGENT.DEALER_ID,AGENT.NAME), ())
</code>
Do let me know your suggestions
Regards

Not sure but may be
See below query
SQL> SELECT deptno,ROUND(AVG(sal))
  2  FROM emp
  3  GROUP BY ROLLUP(deptno,sal+rownum);
    DEPTNO ROUND(AVG(SAL))
        10            1300
                      2450
                      5000
                     "2917"      ---Sub total
       20             800
                      1100
                      2975
                      3000
                      3000
                     "2175"      ---Sub total 
      30               950
                      1250
                      1250
                      1500
                      1600
                      2850
                     "1567"    ---Sub total
                     "2073"   ----Grand total
18 rows selected.
Now you want
SQL> SELECT (2917+2175+1567)/3 FROM dual;
(2917+2175+1567)/3
        2219.66667
While it is
SQL> SELECT ROUND(SUM(sal)/COUNT(*)) FROM emp;
ROUND(SUM(SAL)/COUNT(*))
                    2073Khurram

Similar Messages

  • Isse with using Grouping Sets in SQL Server 2008 R2

    Hi,
    I created a query in SQL Server 2012 using grouping sets that works fine.  When I try to use the same query in SQL Server 2008 I get an error ("Inccorrect syntax near SETS").
    I researched using grouping sets in 2008 and didn't see any issue with my query.  What is different in grouping sets 2008 vs 2012?
    SELECT tl.ClientRegionCd as [Client Region Code] , tl.ClientRegionDesc as [Region Name], count(tl.CompleteICN) as [Trauma Letters Sent]
    from TORT_Trauma_Letters tl
    Where CONVERT(VARCHAR(26), tl.SecondNoticeSent, 23) between '2014-06-12' and '2014-06-12'
    GROUP BY GROUPING SETS((tl.ClientRegionCd, tl.ClientRegionDesc), ())
    Stacie

    Check this blog post as how to deal with date ranges
    http://sqlblog.com/blogs/aaron_bertrand/archive/2009/10/16/bad-habits-to-kick-mishandling-date-range-queries.aspx
    For your result you can simply achieve your result with UNION ALL, e.g.
    select Client, Region, Letters
    from myTable 
    UNION ALL
    select NULL, NULL, SUM(letters) as Letters
    For every expert, there is an equal and opposite expert. - Becker's Law
    My blog
    My TechNet articles

  • How to sort specific column when using GROUPING SETS in SQL Server?

    If I remember correctly, in SQL Server, it is not recommended to use "ORDER BY" when there's already a GROUP BY GROUPING SETS.
    I have two columns: [UPC#] & [Description] both are varchar.
    My grouping sets is like this:
    GROUP BY
    GROUPING SETS
    ([UPC],[Description])
    I don't have 'ORDER BY' but it's automatically sorting the Description column.
    If I added a 3rd column, sum(Qty), then it doesn't sort by Description anymore. But if I added
    ORDER BY [Description]
    then the grand total of sum(Qty) will be at the first row instead of the last.
    Is there a way to sort the Description column and still let the grand total of sum(Qty) be at the last row instead?
    Thanks.

    Yes, it works.
    Thank you.
    Could you kindly explain the logic?
    I don't quite understand the "= 3 THEN 1 ELSE 0" part.
    Is the #3 mean the column index 3?
    GROUPING_ID returns a bit mask value depending on number of columns grouped in the result 
    So when you do GROUPING_ID(([UPC]),([Description]))
    it has two columns UPC and Description so bit mask will be as follows
    0 ie 00 for rows grouped by both UPC and Description fields
    1 ie 01 for rows grouped by UPC ie UPC subtotals
    2 ie 10 for rows grouped by Description ie Description subtotals
    3 ie 11 for rows not grouped by both columns ie Grand total
    see
    http://msdn.microsoft.com/en-IN/library/bb510624.aspx
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Has anyone used grouping sets or perhaps rollup function

    I am trying to do a rollup query ....to sum up sales based on an
    account number you would think pretty simple.....so here is the
    query I wrote
    SELECT broker_number
    account_number , ACCOUNT_NAME ,
    to_char( SUM ( FACTORY_NET_AMT ) , '9,999,999,999') sales$
    FROM broker_account_expanded
    WHERE product_level = 'BRND'
    and product_level_Code not in ( select PROD_CATEGORY_CD from
    genesis.tFIN_BRAND )
    AND PRODUCT_LEVEL_CODE = '100515'
    group by GROUPING SETS (
    ( broker_number , account_number , account_name ))
    however I am getting the following error
    SQL> /
    group by GROUPING SETS (
    ERROR at line 9:
    ORA-00933: SQL command not properly ended
    Any ideas ?
    Thank's
    Sameer Handa

    I think correct would be:
    GROUP BY ROLLUP (broker_number , account_number , account_name )

  • How to get the list of Group set in each Users in MS Active Directory

    Hi. I would like to know if you know how to get the set group of each user in Active Directory?
    We have this sample code
    String INITCTX ="com.sun.jndi.ldap.LdapCtxFactory";
    //String MY_HOST = "ldap://myserver/ou=dev,dc=test,dc=com,dc=ph";
    String MY_HOST ="ldap://myserver.dev.test.com.ph:389/dc=dev,dc=test,dc=com,dc=ph";
    String strUsername,strPassword;
    try
         strUsername = Request.getParameter("username").toLowerCase().trim();
         strPassword = Request.getParameter("password").toLowerCase().trim();
         Hashtable env = new Hashtable();
         env.put(Context.INITIAL_CONTEXT_FACTORY, INITCTX);
         env.put(Context.PROVIDER_URL, MY_HOST);
         env.put(Context.SECURITY_AUTHENTICATION, "simple");
         env.put(Context.SECURITY_PRINCIPAL,strUsername+"@dev.lst.com.ph");
         env.put(Context.SECURITY_CREDENTIALS, strPassword);
    After validating the User Name and Password the next task is to Retrieve the group list of the User.

    Nope I want the log-in user to retrieve its Group where he is belong. I have this following code
    strUsername = Request.getParameter("username").toLowerCase().trim()+"@dev.test.com.ph";
    strPassword = Request.getParameter("password").toLowerCase().trim();
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY, INITCTX);
    env.put(Context.PROVIDER_URL, MY_HOST);
    env.put(Context.SECURITY_AUTHENTICATION, "simple");
    env.put(Context.SECURITY_PRINCIPAL,strUsername);
    env.put(Context.SECURITY_CREDENTIALS, strPassword);
    // enable tracing
    env.put("com.sun.naming.ldap.trace.ber", System.err);
    // Create the initial context
    DirContext initCtx = new InitialDirContext(env);
    // Get the target context
    DirContext targetCtx = (DirContext)initCtx.lookup("");
    SearchControls constraints = new SearchControls();
    constraints.setSearchScope(SearchControls.SUBTREE_SCOPE);
    // Perform the search on the target context
    NamingEnumeration enum = targetCtx.search("","(userPrincipalName="+strUsername+")",constraints);
    javax.naming.directory.Attributes attrs;
    NameClassPair item;
    String[] attrIds = new String[]{"MemberOf"};
    // For each answer found, get its "Groups" attribute
    // If relative, resolve it relative to the target context
    // If not relative, resolve it relative to the initial context
    while (enum.hasMore()) {
    item = (NameClassPair)enum.next();
    Out.println(item);
    attrs = targetCtx.getAttributes(item.getName(), attrIds);
    Out.println(attrs + "<br>");
         initCtx.close();
    It returns all this string :
    {memberof=memberOf: CN=CMCanadaRD,OU=Groups / Teams,DC=dev,DC=test,DC=com,DC=ph, CN=iMngrCanadaRW,OU=Groups / Teams,DC=dev,DC=test,DC=com,DC=ph, CN=Domain Users,CN=Users,DC=dev,DC=test,DC=com,DC=ph, CN=Backup Operators,CN=Builtin,DC=dev,DC=test,DC=com,DC=ph, CN=Administrators,CN=Builtin,DC=dev,DC=test,DC=com,DC=ph}
    How can i retrieve the Group named CMCanadaRW and CMCanadaRD on the Attribute?
    Thanks

  • Grouping Sets with Version 1.1

    Has anyone tried to do a query using grouping sets in version 1.1? Everytime I try I get:
    Error report:
    SQL Error: ORA-00604: error occurred at recursive SQL level 1
    ORA-01000: maximum open cursors exceeded
    00604. 00000 - "error occurred at recursive SQL level %s"
    *Cause:    An error occurred while processing a recursive SQL statement
    (a statement applying to internal dictionary tables).
    *Action:   If the situation described in the next error on the stack
    can be corrected, do so; otherwise contact Oracle Support.

    I can't imagine why SQL Developer would use more cursors than other tools as it is essentially just sending the sql statement to the database using jdbc. There were some problems with cursor leaks in earlier versions but I believe those were fixed.
    Try this query from another session. It shows current and accumulated cursors. Run it when you start sqldeveloper, and before and after running the query.
    select sid, name,value
    from v$sesstat sess
    inner join v$statname stat
      on sess.statistic#=stat.statistic#
    where sess.sid=<your session sid>
    and name like 'opened%';

  • Using a dropdown to set a radio button

    I've been searching and searching in vain, trying many different things can I cannot seem to find an answer already or stumble on similar code to help.
    I've got a dropdown, then when you select different values set different fields on the form. That part works fine stuff like this in the custom validate:
    if (event.value == "Thing1") {
      this.getField("DESC01").value = "Words that fill in a desciption box.";
      this.getField("DESC02").value = "More words that fill in another descrption box";
      this.getField("F_SKILL1").value = "1";
      this.getField("RB_SKILL1").isBoxChecked(1);
      this.getField("F_SKILL2").value = "1";
      this.getField("F_SKILL3").value = "1";
    } else if (event.value == "Thing2") {
      this.getField("DESC01").value = "Different words that fill in a desciption box.";
      this.getField("DESC02").value = "More different words that fill in another descrption box";
      this.getField("F_SKILL4").value = "1";
      this.getField("RB_SKILL1").isBoxChecked(0);
      this.getField("F_SKILL5").value = "1";
      this.getField("F_SKILL6").value = "1";
    etc, etc. I've got a few different else ifs but they all follow this kind of format. There is are also radio button next to the skills on the sheet to visually display that skill is known. So I'd like to turn that radio button on. My isBoxChecked isn't working, and I expect that's because it doesn't work that way. I have a lot of radio buttons on the form, but they all have 1 choice in them none are groups. Again, I'm using this as a visual display that SKILLX is known. The area I've dropped the radio button onto the sheet is a very small circle which is why I am trying to use a radio button as it's visually similar.
    If there is a better solution to what I'm trying to do I'm happy to try that, or if someone can tell me what I'm doing wrong that'd be super
    Thanks!

    Not quite sure I'm getting what you are laying down...
    So in the dropbox, under options I should set the export value of Thing1 choice to RB_SKILL1 and then in my validate I should include this.getField("RB_SKILL1").value = 'Yes' ?
    Or I should just set the export value of Thing1 to this.getField?
    Thanks
    Oh, using a check box I was able to get this working using the export values set for Thing1 option, most excellent! Thank you very much!

  • "An incorrect PPP option has been set" issue

    I have a USB DSL modem which connects me via my ISP to the net.
    I recently had to re-install my OS on my Mac Mini to 10.4.x and I then upgraded the OS to 10.4.11. I have been trying and frustratingly failing to connect to the net. Every time I try I keep getting the "incorrect PPP option has been set" message. I never used to have any issues connecting before the re-install but now this.
    I have checked, and double checked, the username and password in my network/internet connect settings but keep getting the same message. I also have an iBook G4 and that connects to the net no problem with the same information and that uses 10.3.9. I have checked the settings and all PPP options are the same.
    The one thing that baffles me is that when I enter my password in Network and click Apply Now I get 24 bullets rather than 8 that my password has. The iBook shows 8 bullets. But I am lead to believe this is an Apple security thing that shows that many bullets (?).
    I've tried uninstalling & re-installing the USB software, I've also tried deleting some preferences and all I know.
    Any Mac gurus out there help?

    Morning MPD,
    [This page|http://www.bulldogbroadband.com/residential/products/broadband/equipment.a sp#freewireless2] on Bulldog's website mentions a couple of ethernet based devices (the last one is also wireless, if you don't have wireless cards in your machines then that might be superfluous to needs).
    The cheaper of the 2 is only £1 more than the USB modem you have. Try persuading Bulldog to see if you can swap your existing modem for that one.
    02 Broadband provide that wireless model (I'm with O2 at present :)) and it seems to work fine wirelessly with Macs. Previously I've had good experience with Netgear routers, but everyone has their favourites. Linksys and D-Link are often also recommended.
    Good luck with the reinstallation, I hope that solves this strange problem for you.

  • In mdx how to get max date for all employees is it posible shall we use group by in mdx

    in mdx how to get max date for all employees is it posible shall we use group by in mdx
    example
    empno  ename date
    1         hari        12-01-1982
    1         hari        13-06-2000
    by using above data i want to get max data

    Hi Hari3109,
    According to your description, you want to get the max date for the employees, right?
    In your scenario, do you want to get the max date for all the employees or for each employee? In MDX, we have the Max function to achieve your requirement. You can refer to Naveen's link or the link below to see the details.
    http://www.sqldbpros.com/2013/08/get-the-max-date-from-a-cube-using-mdx/
    If this is not what you want, please provide us more information about the structure of you cube, so that we can make further analysis.
    Regards,
    Charlie Liao
    TechNet Community Support

  • How to Get ZERO and Non-ZERO Values in rowcount using Group by?

    Dear All,
    How can I get Non-ZERO and ZERO row count values in SQL using Group by? I can get non-zero values but when I want NULL should be returned to non-zero values it is ignoring ZERO values in output?
    Any hint?
    Thanks
    GQ

    Hi,
    Something like
    select count(case col
                    when 0
                    then 1
                  end) zero_count,
           count(case nvl(col,1)
                    when 0
                    then null
                    else 1
                  end) nonzero_countRegards
    Peter

  • How to get List of SharePoint Groups to which Current Users belongs using Javascript ?

    How to get List of SharePoint Groups to which Current Users belongs using JavaScript? Not JSOM

    Here is the code that worked for me:
    var userid= _spPageContextInfo.userId;
      var requestUri = _spPageContextInfo.webAbsoluteUrl + '/_api/web/CurrentUser/Groups?$select=Id,Title';
    alert(requestUri);
      var requestHeaders = { "accept" : "application/json;odata=verbose" };
      $.ajax({
        url : requestUri,
        contentType : "application/json;odata=verbose",
        headers : requestHeaders,
        success : onSuccess,
        error : onError
      function onSuccess(data, request){
    var s='';
     for (var i = 0; i < data.d.results.length; i++)
    s +=data.d.results[i].Title+'\n';
        alert(s);
      function onError(error) {
        alert("error");

  • Display "group name" values and their average formulas (calculation of average age) on a single line or row

    <p>I have four groupings, Domain, Area, Priority (3rd level of grrouoping) and then Problem ID. Priority group could have values such as &#39;1&#39;, &#39;2&#39;, &#39;3&#39;, &#39;4&#39; and &#39;5&#39; with corresponding "average" age formula on these group level. values.</p><p>Example:  1         Avg Age= 30</p><p>               2         Avg Age= 45</p><p>               3         Avg Age= 69</p><p>Reguirement:  Display group name values and their corresponding average formula on a single line/row.</p><p>Sample Solution:   Priority 1 = 30, Priority 2 = 45, Priority 3 = 69 </p><p> ***solution above should be displayed/concatenated on one line.</p><p>Your help is greatly appreciated, thank you in advance.</p>

    So right now - your report looks like this
    GroupHeader 1
       GroupHeader 2
           Priority 1 = 50         (actual display of Group 3)
           Priority 2 = 75         (actual display of Group 3)
           Priority 3 = 45         (actual display of Group 3)
           Priority 4 = 9          (actual display of Group 3)
           Priority 5 = 8          (actual display of Group 3)
    And you want to change that so that it displays horizontally.
    If there will only ever be 5 priorities, I think I would cheat the system a bit.  Create a formula that runs at the group 3 level and dumps the values into 5 separate variables (formula below).
    Then create 5 separate display formulas and put them in Group Footer 2 (if you already have a GF2 - then create a second one and move it above your current GF2).  Suppress the G3 section and you should be close to what you are after (unless you also have detail sections, then we'll need to revisit).
    This could also be accomplished with a multi-column subreport at the G2 or G3 level if you need more flexibility.
    formula *******
    numbervar priority1;
    numbervar priority2;
    numbervar priority3;
    numbervar priority4;
    numbervar priority5;
    if {DB.Priority} = 1 then priority1:= {@avgGroupPriorityAvgAge}
    else if {DB.Priority} = 2 then priority2:= {@avgGroupPriorityAvgAge}
    else if {DB.Priority} = 3 then priority3:= {@avgGroupPriorityAvgAge}
    else if {DB.Priority} = 4 then priority4:= {@avgGroupPriorityAvgAge}
    else if {DB.Priority} = 5 then priority5:= {@avgGroupPriorityAvgAge}

  • Error while using Group By on 2 Querys joined by union

    Hello Everyone
    I have a situation where in one report i cannot group the data and in another report when i group the data i am unable to view subject area.
    I Had a Complex Request from my client , i have to claculate a report based on 2 dimensions i.e i am calculating 2 measures from one dimension and other 3 measures from other dimension and then using UNION to join both the querys , for the same description the data is being displayed in 2 rows , then i i tried to combine both the querys from union and trying to select from those then i am getting the result and the problem is i am unable to access the subject area , its giving "Either you do not have permission to use the subject area within Answers, or the subject area does not exist." Error , i am unable to add prompts to these request
    I want the investor Grants Row to be displayed in one Column , I am already using Group by in one of the querys.
    Study                      Cost            Approved         Committed                 Earned          Paid Balance
    Investigator Grants 350,000.00 113,770.78 0.00 0.00 0.00
    Investigator Grants 350,000.00 113,770.78 42,403.13 19,905.90 22,497.23
    Labs 23,000.00 0.00 0.00 0.00 0.00
    Study Drug 47,000.00 0.00 0.00 0.00 0.00
    Other 0.00 0.00 0.00 0.00 0.00
    Here is my query
    SELECT "- Protocol"."Protocol #" saw_0, "- Protocol"."Working Title" saw_1, CURRENT_DATE saw_2, "- Administration"."Display Currency Code" saw_3, "- Protocol"."Managing Country" saw_4, "- Protocol".Country saw_5, "- Protocol"."Country OPS" saw_6, "- Protocol"."EU Country" saw_7, "- Protocol"."GCO Region" saw_8, "- Protocol"."GPB Region" saw_9, "- Administration"."Study Cost" saw_10, SUM (IfNull("- Budget and Payment Facts"."Protocol Cost Line Item Amount - Display CCY",0) BY "- Administration"."Study Cost" ) saw_11, SUM(IfNull("- Budget and Payment Facts"."Committed Amount - Display CCY",0) BY "- Administration"."Study Cost") saw_12, SUM(IfNull("- Budget and Payment Facts"."Actual Amount - Display CCY",0) BY "- Administration"."Study Cost") saw_13, SUM(IfNull("- Budget and Payment Facts"."Amount Paid (SP) - Display CCY",0) BY "- Administration"."Study Cost") saw_14, SUM(IfNull("- Budget and Payment Facts"."Actual Amount - Display CCY",0)-IfNull("- Budget and Payment Facts"."Amount Paid (SP) - Display CCY",0) BY "- Administration"."Study Cost") saw_15, CASE WHEN "- Administration"."Study Cost" = 'Other' THEN 1 END saw_16 FROM "SPECTRUM Reporting" WHERE ("- Administration"."Display Currency Code" = 'USD') AND ("- Protocol"."Protocol #" = 'P31248') UNION SELECT "- Protocol"."Protocol #" saw_0, "- Protocol"."Working Title" saw_1, CURRENT_DATE saw_2, "- Administration". "Display Currency Code" saw_3, "- Protocol"."Managing Country" saw_4, "- Protocol".Country saw_5, "- Protocol"."Country OPS" saw_6, "- Protocol"."EU Country" saw_7, "- Protocol"."GCO Region" saw_8, "- Protocol"."GPB Region" saw_9, "- Administration"."Study Cost" saw_10, IfNull("- Budget and Payment Facts"."Protocol Cost Line Item Amount - Display CCY",0) saw_11, IfNull("- Budget and Payment Facts"."Committed Amount - Display CCY",0) saw_12, 0.00 saw_13, 0.00 saw_14, 0.00 saw_15, CASE WHEN "- Administration"."Study Cost" = 'Other' THEN 1 END saw_16 FROM "SPECTRUM Reporting" WHERE ("- Protocol"."Protocol #" = 'P31248') AND ("- Administration". "Display Currency Code" = 'USD') ORDER BY saw_16 DESC
    Any help is appreciated ..!
    ~Srix

    Here is the query i used to group the data but i cannot access Answers with this query
    SELECT saw_0 saw_0, saw_1 saw_1, saw_2 saw_2, saw_3 saw_3, saw_4 saw_4, saw_5 saw_5, saw_6 saw_6, saw_7 saw_7, saw_8 saw_8, saw_9 saw_9, saw_10 saw_10, SUM(saw_11 BY saw_10) saw_11, SUM(saw_12 BY saw_10 ) saw_12, SUM(saw_13 BY saw_10) saw_13, SUM(saw_14 BY saw_10) saw_14, SUM(saw_15 BY saw_10) saw_15, saw_16 saw_16 FROM (SELECT "- Protocol"."Protocol #" saw_0, "- Protocol"."Working Title" saw_1, CURRENT_DATE saw_2, "- Administration"."Display Currency Code" saw_3, "- Protocol"."Managing Country" saw_4, "- Protocol".Country saw_5, "- Protocol"."Country OPS" saw_6, "- Protocol"."EU Country" saw_7, "- Protocol"."GCO Region" saw_8, "- Protocol"."GPB Region" saw_9, "- Administration"."Study Cost" saw_10, SUM (IfNull("- Budget and Payment Facts"."Protocol Cost Line Item Amount - Display CCY",0) BY "- Administration"."Study Cost" ) saw_11, SUM(IfNull("- Budget and Payment Facts"."Committed Amount - Display CCY",0) BY "- Administration"."Study Cost") saw_12, SUM(IfNull("- Budget and Payment Facts"."Actual Amount - Display CCY",0) BY "- Administration"."Study Cost") saw_13, SUM(IfNull("- Budget and Payment Facts"."Amount Paid (SP) - Display CCY",0) BY "- Administration"."Study Cost") saw_14, SUM(IfNull("- Budget and Payment Facts"."Actual Amount - Display CCY",0)-IfNull("- Budget and Payment Facts"."Amount Paid (SP) - Display CCY",0) BY "- Administration"."Study Cost") saw_15, CASE WHEN "- Administration"."Study Cost" = 'Other' THEN 1 END saw_16 FROM "SPECTRUM Reporting" WHERE ("- Administration"."Display Currency Code" = 'USD') AND ("- Protocol"."Protocol #" = 'P31248') AND ("- Payment"."Payment Number"="- Payment"."Related Payment Request Number")
    UNION SELECT "- Protocol"."Protocol #" saw_0, "- Protocol"."Working Title" saw_1, CURRENT_DATE saw_2, "- Administration". "Display Currency Code" saw_3, "- Protocol"."Managing Country" saw_4, "- Protocol".Country saw_5, "- Protocol"."Country OPS" saw_6, "- Protocol"."EU Country" saw_7, "- Protocol"."GCO Region" saw_8, "- Protocol"."GPB Region" saw_9, "- Administration"."Study Cost" saw_10, IfNull("- Budget and Payment Facts"."Protocol Cost Line Item Amount - Display CCY",0) saw_11, IfNull("- Budget and Payment Facts"."Committed Amount - Display CCY",0) saw_12, 0.00 saw_13, 0.00 saw_14, 0.00 saw_15, CASE WHEN "- Administration"."Study Cost" = 'Other' THEN 1 END saw_16 FROM "SPECTRUM Reporting" WHERE ("- Administration"."Display Currency Code" = 'USD') AND ("- Protocol"."Protocol #" = 'P31248')) T GROUP BY saw_0, saw_1, saw_2, saw_3, saw_4, saw_5, saw_6, saw_7, saw_8, saw_9, saw_10 , saw_11, saw_12, saw_13, saw_14, saw_15, saw_16 ORDER BY saw_0, saw_1, saw_2, saw_3, saw_4, saw_5, saw_6

  • Divestitature document not getting reversed at receiver group

    Hi
    We have transferred some cons Unit at the upper level of hierarchy under higher cons group,but facing issue of divestitature docuemnt not getting reversed at receiver group,
    This is a vertical upward transfer and have used OC logic to avoid goodwill/gain calculation
    Can some one help me why divestiture document is not getting reversed at receiver group
    Regards
    Sunit

    Hi
    Thanks for you reply,divestiture accounting was done only after doing all necessary change in both receiver and sender group,
    defined FCEP and used OC logic in receiver group,however there are three error in COI task due to imbalance entry will it have anmy impact on document not getting reversed.
    Regards
    Sunit

  • Analytical Services failed to get user's parent group tree with Error

    Hi,
    We have a frequent errror during our weekly batch for an application.
    The context:
    - Essbase Administration Services we are using is version is 9.3.1.
    - 8 applications are calculated during the week-end. The scripts executed are exactly the same for the 8 applications.
    - For example let's say that 5 scripts are launched during the night in the batch for each application (script 1, script 2 ... script 5)
    - App1 and App2 are launched alone and before the 6 others applications as these applications database are 3 x bigger (App1 is calculated alone, then app2 is calculated alone, then app3 to app8 scripts are launched in the same time).
    The issue :
    - We don't see any issue for app3 to app8, the calculation are executed without any problem from script1 to script5.
    - But we have an error in App1 and App2 log when the bath execute script 4 and we see the following error in the server log **
    "Analytical Services failed to get user's parent group tree with Error".
    (** : we don't see any log for script 4 in the application log - it's like the server bypass script 4 to go directly from script 3 to script 5 )
    Nothing special is done in script 4 but just an aggregation of the Year dimension (using a @SUM(@RELATIVE(Year,0)) calculation.
    I think that there is may be a synchronization error with Shared Services but what is strange is that it's always for the same script 4 and the batch is launched at different time every week-end.
    Can the issue be linked to the size of the database of applications (8 Gb) and difficulties for the processor to executes aggregation in a large database volume ?

    Hi,
    According to your description, my understanding is that the error occurred when sending an email to the user in workflow.
    Did you delete the existing Connections before setting NetBiosDomainNamesEnabled?
    If not, I recommend to delete and recreate your AD connections, then set NetBiosDomainNamesEnabled to true.
    Or you can delete the original User Profile Service Application and create a new one, then set the NetBiosDomainNamesEnabled to true and start the User Profile Service Application
     synchronization.
    More reference:
    http://social.technet.microsoft.com/wiki/contents/articles/18060.sharepoint-20xx-what-if-the-domain-netbios-name-is-different-than-the-fqdn-of-the-domain-with-user-profile.aspx
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

Maybe you are looking for

  • Calendar problem with summer time

    When I received an invite from somebody using Lotus Notes it is always an hour later than what it should be... I check my configuration to verify if the option to handle time zones were activated and it was... Somebody had the same problem ? Any idea

  • How to set the default value for page item in report

    Hi Gurus I currently i have company name as page item in one of my report screen ,but it is displaying the value for company name in its drop down column ,but i want to make it "*ALL* as default after the query result ",this is user requirement ,plea

  • Error 1935

    Hi.  This is my first time on Adobe forums as I have never had a problem with it before.  I downloaded Reader 10.1.2 and then installation reached 96% when i received the 1935 error message.  I disabled Norton whilst downloading and did it from IE8. 

  • Default number of columns shown on query

    Hi, how can i adjust the default number of columns shown on a query table (without scroll) without creating a template on WAD. I'm using BW7 with Portal. thx

  • Drag'n drop attachments from emails crashes Mails

    I just upgraded to 10.8.2 When I opened Mail it said it needed to rebuild the database. Ok, fine by me. Afterwards mail opened neatly. But when I dragged an attachment to the desktop the attachment got 'stuck' to my pointer. Meanwhile OS X went into