Цитата:
Сообщение от
PavelSR
Я подозреваю, что для этих целей придется заводить отдельное поле во временной(результирующей) таблице.
Быть может есть возможность, всетаки, обойтись без добавления доп. поля?
Возможность, конечно, есть.

Стоит ли ей пользоваться?
X++:
static void Job30(Args _args)
{
CustTrans custTrans;
custTrans tmpcustTrans;
;
tmpcustTrans.setTmp();
changecompany('S11')
{
custTrans = null;
select firstonly custTrans;
buf2buf(custTrans, tmpcustTrans);
tmpcustTrans.overwriteSystemfields(true);
tmpcustTrans.(fieldNum(CustTrans, DataAreaId)) = curExt();
tmpcustTrans.doInsert();
}
while select tmpcustTrans
{
info(tmpcustTrans.dataareaid);
}
changecompany('S10')
{
custTrans = null;
select firstonly custTrans;
buf2buf(custTrans, tmpcustTrans);
tmpcustTrans.overwriteSystemfields(true);
tmpcustTrans.(fieldNum(CustTrans, DataAreaId)) = curExt();
tmpcustTrans.doInsert();
}
while select tmpcustTrans
{
info(tmpcustTrans.dataareaid);
}
}