You need to sign in to do that
Don't have an account?
Manj_SFDC
sorting by multiple columns in apex
Hello guys,
I need to write a SOQL with sorting on 2 columns , start date and created date, can it possible to sort on multiple columns , or by default Apex considers only the first column used in sorting , please help
Thanks !
I need to write a SOQL with sorting on 2 columns , start date and created date, can it possible to sort on multiple columns , or by default Apex considers only the first column used in sorting , please help
Thanks !
You can use sorting with 2 columns for example see below query
Refer below link.
https://developer.secure.force.com/cookbook/recipe/sorting-query-results
Please mark it as solved if my reply was helpful, it will make it available
for others as a proper solution.
Best Regards,
Sandhya
All Answers
You can use sorting with 2 columns for example see below query
Refer below link.
https://developer.secure.force.com/cookbook/recipe/sorting-query-results
Please mark it as solved if my reply was helpful, it will make it available
for others as a proper solution.
Best Regards,
Sandhya
SELECT Name FROM ObjectName ORDER BY CreatedDate ASC, start_date__c ASC
Let me know if u have any other concerns