You need to sign in to do that
Don't have an account?
Michael Webb 15
Can't get the SOQL correct Limit 100
I am not sure what I am doing incorrectlly, I am pretty new.
Here is my query, I need to add a limit in there no matter what I try it is not working.
public PageReference submitCase() {
List<Account> accts = [SELECT Id FROM Account WHERE AccountNumber = :acctNum];
I tried which I thought would work.
List<Account> accts = [SELECT Id FROM Account [Limit 100] WHERE AccountNumber = :acctNum limit 10];
But it is not. Thanks in advance!
Here is my query, I need to add a limit in there no matter what I try it is not working.
public PageReference submitCase() {
List<Account> accts = [SELECT Id FROM Account WHERE AccountNumber = :acctNum];
I tried which I thought would work.
List<Account> accts = [SELECT Id FROM Account [Limit 100] WHERE AccountNumber = :acctNum limit 10];
But it is not. Thanks in advance!
https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select_limit.htm
LIMIT is an optional clause that can be added to a SELECT statement of a SOQL query to specify the maximum number of rows to return.The syntax for LIMIT is Please let us know if this will help you