Join Statement in X++ AX 2009
This way to write join statement inside X++ code to select specific data from more than one table :
static void test(Args _args)
{
MOHItemBatchRelation mibr;
InventSum invsum;
InventDim invdim;
str s;
;
select invdim
join invsum
join mibr
where mibr.ItemBatchRefId == invsum.MOHItemBatchRefId && invdim.inventDimId ==
invsum.InventDimId;
{
info(strfmt("invdim %1 is a %2", invdim.wMSLocationId,
invdim.InventLocationId));
}
}
Comments