Interview Questions

Wednesday, September 3, 2014

How to print second highest number in any table in AX 2009 ?

static void Maxvalue(Args _args)
{
   Testtable               t1;
   int                         i; // Use int64 if value is long or high
   ;
   while select t1 order by accounts desc
   {
       i++;
       if (i == 2)
      {
              info(strfmt("%1",t1.Accounts));
      }
   }
}

No comments:

Post a Comment