You need to sign in to do that
Don't have an account?
karthikeya 2
SOQL query for fetching 2nd record?
Hello every one,
how to fetch 2nd record by SOQL query, with out using offset.
my qyery: select id,createdDate,End_Date__c,Employee__c from Organization__c where ahm__Employee__c = 'a0Z37000001xwfP' order by CreatedDate DESC limit 1 offset 1
but with out using offset , because batch class will not accept the offser.
Thanks in advance.
how to fetch 2nd record by SOQL query, with out using offset.
my qyery: select id,createdDate,End_Date__c,Employee__c from Organization__c where ahm__Employee__c = 'a0Z37000001xwfP' order by CreatedDate DESC limit 1 offset 1
but with out using offset , because batch class will not accept the offser.
Thanks in advance.
Ex: Database.executeBatch(yourbatchclassobject, 1);
Specify your query as
select id,createdDate,End_Date__c,Employee__c from Organization__c where ahm__Employee__c = 'a0Z37000001xwfP' order by CreatedDate DESC limit 1
Let us know if it helps.