Is it possible to create query with table type TEMP DB ? My query works fine when table in exists join is REGULAR. After changing table to TEMP DB (rows to this data source is added) query didn't work.
This is my job:
ttsBegin;
//MyTableTempDB with TableType=TempDB
MyTableTempDB.clear();
MyTableTempDB.MyKey= 324;
MyTableTempDB.insert();
//query
query = new query();
//1 DS
qbdsNormalTable = query.addDataSource(tablenum(NormalTable));
//2 DS but MyTableTempDB with TableType=TempDB
qbdsMyTableTempDB = qbdsNormalTable.addDataSource(tablenum(MyTableTempDB));
qbdsMyTableTempDB.relations(false);
qbdsMyTableTempDB.joinMode(joinMode::ExistsJoin);
qbr = qbdsMyTableTempDB.addRange(fieldNum(MyTableTempDB, DataAreaId));
qbr.value(strFmt('(%1.Key == %2.MyKey)',
qbdsNormalTable.name(),
qbdsMyTableTempDB.name()));
//queryRun
queryRun = new QueryRun(query);
while(queryRun.next())
{
NormalTable = queryRun.get(tableNum(NormalTable));
info(strFmt("%1", NormalTable.RecId));
}
ttsCommit;