You  can use expression in select query in axapta following way.    LedgerTable  LedgerTable ;    info(strfmt('%1',(select firstonly AccountNum from LedgerTable order by AccountNum desc            ).AccountNum));     
Microsoft Dynamics Ax,AIF,Axapta, Enterprise portal,,Microsoft , United State,U.S., SharePoint , BI Tools, Performance Tuning, SSRS,Business Logic,Ax ERP Errors and solution,Dynamics 365 Errors Solution,Business software .