Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Blogs / DaxGeek / Sorting Options By Order By

Sorting Options By Order By

Hossein.K Profile Picture Hossein.K 6,648
If an index does not exist on a table, you can create a temporary index using anorder by clause in the select statement. This lets you specify one or more table
fields to sort the result. By default, records are sorted in ascending order. To sort
in descending order, use the keyword
desc after the order by field. The following
example shows how to use the
order by clause in descending order .


1
2
3
4
5
6
7
CustTable custTable;
while select custTable order by AccountNum desc
{
print custTable.AccountNum, " ",
custTable.currency;
}
pause;

Best Regards,
Hossein Karimi

Comments

*This post is locked for comments