Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
3
votes
Using Aggregate SOQL With Large Amounts of Data (> 500k records)
I note that your query includes:
WHERE BI_UPDATE_DATE_MSD__c = 2014-09-01
which may be selective enough to allow your query to work. As Working with Very Large SOQL Queries describes, that term wou …
2
votes
how to use logic with aggregate result
If you take an example of say 5, all your if(nextInvNum tests are true and each one does its assignment with the last one (that only adds a single '0') winning.
One way to fix this is:
if(nextInvNum …
3
votes
Accepted
Counting query results and displaying them in visualforce
headervalue="Quantity">
</apex:column>
</apex:pageblocktable>
</apex:pageblock>
</apex:page>
The error you were seeing was that you had not provided the alias name "quantity" in the aggregate …
1
vote
Accepted
Apex AggregateResult from 2 Objects
If you mean you want to append the second set of records then this should do it:
public List<CoverageTeamMember> getCoverageTeam() {
Account a = getAccount(this.controller != null ? this.controll …
1
vote
Aggregate Values with Limits and Orders
The problem is that multiple rows can be merged to create each AVG so you also need to find a way to combined the CreatedDate values of those multiple rows into a single value. I think the only choice …
5
votes
Accepted
Display an aggregate result on a visualforce page
The AggregateResult object is like a Map and so to access the values you need to use map syntax in the Visualforce:
<apex:column value="{!s['total']}"></apex:column>
PS
Here is a working example o …
2
votes
AggregateResult Count help
I don't understand the two parts of your question but the code below hopefully covers at least part of what you are looking for.
Because count(fieldName) is available, some simple dynamic SOQL can be …
0
votes
Accepted
Better SOQL Query or Ability to Parse Results by Field
Your field/object naming is a little puzzling, but this outline illustrates a general approach to the problem where a single aggregate query is done grouped by the set of SKU values with a map used to …
1
vote
Accepted
Cross-tabular Report based on GROUP BY CUBE Result
Here is some (untested) code for one way to do this.
Call this method somewhere in your controller to convert the data. It finds the unique origin and status values and adds up the counts for all the …
3
votes
How to sort Wrapper class?
To add to dphil's answer, for your class it sounds like you want something like this:
public class QLWrap implements Comparable {
...
public Integer compareTo(Object o) {
QLWrap tha …
7
votes
Accepted
For loop run just once
The problem is probably that you re-initilaise the Summaries list every time round the loop to an empty list so you end up with only 1 item in the final list.
This is probably what you want:
Summ …
0
votes
Accepted
Aggregate List displaying Repeating values
One solution is to modify the logic to also capture Servicer__r.Id in the aggregate queries and to store that in the CoverageTeamMember class (in a field called say servicerId). …
5
votes
Incompatible types since an instance of List is never an instance of AggregateResult
When you execute a query that includes a GROUP BY term it is always an array (list) of AggregateResult objects that is returned - see Working with SOQL Aggregate Functions. …
3
votes
Accepted
Group by Rollup: Visualforce Remoting Exception: Too many query rows: 1000001
Surprising.
It would be worth looking at the query in the Developer Console Query Plan Tool. (That article includes several links about how Salesforce queries are optimised.) In case it made a differ …