что-то типа этого
PHP код:
static void Job36(Args _args)
{
Query q;
QueryRun qr;
InventTable it;
InventItemBarCode iibr;
QueryBuildDataSource qbds;
;
q = new Query();
qbds = q.addDataSource(tablenum(InventTable));
qbds = qbds.addDataSource(tablenum(InventItemBarCode));
qbds.addLink(fieldnum(InventTable,ItemId),fieldnum(InventItemBarCode,ItemId));
qbds.joinmode(JOINMODE::INNERJOIN);
qr = new QueryRun(q);
while (qr.next())
{
it = qr.get(tablenum(InventTable));
iibr = qr.get(tablenum(InventItemBarCode));
info(strfmt("%1 %2",it.ItemName,iibr.ItemBarCode);
break;
}
}