function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SBNSBN 

Records based on Timestamp

Hi,

 

I have a requirement to process the records (which have same data) based on the latest timestamp from the staging table.

 

Could any one tell me the SOQL query to retrieve the records based on the latest timestamp?

 

Thanks

Avidev9Avidev9
You can do somehting like.
List<MyStagingObject__c> objects = [SELECT Id FROM MyStagingObject__c OrderBy LastModifiedDate];