Добрый день!
Хочу во временную таблицу запихать строки из разных компаний.
Например:
X++:
static void Job27(Args _args)
{
CustTrans custTrans;
custTrans tmpcustTrans;
;
tmpcustTrans.setTmp();
custTrans.company("S11");
select custTrans;
tmpcustTrans.company("S11");
tmpcustTrans.data(custTrans);
tmpcustTrans.insert();
while select tmpcustTrans
{
info(tmpcustTrans.dataAreaId);
}
custTrans = null;
custTrans.company("S10");
select custTrans;
tmpcustTrans.company("S10");
tmpcustTrans.data(custTrans);
tmpcustTrans.insert();
while select tmpcustTrans
{
info(tmpcustTrans.dataAreaId);
}
}
В результате получаю:
S11
S10
S10
Т.е. в итоге во временной таблице в поле dataAreaId стоит S10, Но я же записыват туда запись с компанией S11. Почему получилось так, что компания в записях изменилась?