Notifications
Announcements
No record found.
How can I achieve the following in X++
while select TaxTrans_IN
order by substr(TaxTrans_IN.WAREHOUSE,1,2), TaxTrans_IN.TransDate
*This post is locked for comments
Hi Ravi,
You cannot use functions in select statements in AX its not supported. You can either use computed columns in a view or call direct SQL query (e.g. through Statement class in AX or a framework in .NET, such as Entity Framework).
You cannot use such functions in an AX select statement, it has no interpreter for AX functionality to be executed on SQL Server-side.
But if you want to sort it by the first 2 characters anyway, it would be correctly sorted if you just order by the warehouse, since it will be in alphanumerical order anyway!
Thanks
If our suggestions helped you please mark this question as verified to help our members
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 4 Most Valuable Professional
Priya_K 4
MyDynamicsNAV 2