Quantcast
Channel: Dick Wenning's Activities
Viewing all articles
Browse latest Browse all 1245

Create query with TEMP DB on exists join - is it possible ?

$
0
0

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;


Viewing all articles
Browse latest Browse all 1245

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>