Showing posts with label minof and maxof in axapta. Show all posts
Showing posts with label minof and maxof in axapta. Show all posts

Thursday, June 17, 2010

min and max in ax

Use minof and maxof to find minimum and maximum values of a table field. minof finds the minimum value of a specific field and maxof finds the maximum value of a specific field.

here's the example below.

LedgerTrans ledgerTrans;

select minof(TransDate) from ledgerTrans;

info(strfmt('%1', ledgertrans.TransDate));

select maxof(TransDate) from ledgerTrans;

info(strfmt('%1', ledgertrans.TransDate));


equivalent SQL queries for minimum and maximum date respectively.

select min(transdate) from LedgerTrans

select max(transdate) from LedgerTrans