Sep 5, 2016

Using NoFetch in X++ (X++에서 NoFetch사용)

static void TestNoFetch(Args _args)
{
    CustTable       _CustTable;
    CustGroup       _CustGroup;
    TaxGroupHeading taxGroupHeading;
   
    while select _CustGroup
        where _CustGroup.CustGroup like '*00*'
        join _CustTable
            where _CustTable.CustGroup == _CustGroup.CustGroup
    {
        info(strFmt("Cust account : %1, Cust name : %2, Cust group : %3",_CustTable.AccountNum,_CustTable.name(),_CustGroup.CustGroup));
    }
   
    info('--------------------------------------------------------------');
   
    select noFetch  _CustGroup
        where _CustGroup.CustGroup like '*00*'
        join _CustTable
            where _CustTable.CustGroup == _CustGroup.CustGroup;
    next _CustGroup;
    while(_CustGroup.RecId)
    {
        info(strFmt("Cust account : %1, Cust name : %2, Cust group : %3",_CustTable.AccountNum,_CustTable.name(),_CustGroup.CustGroup));
        next _CustGroup;
    }
}

No comments:

Post a Comment