Avatar

Community Advisor

Hello all,

you might try sqlExec() function to do the job. I think write and write collecion are not to be used with temp tables. (At least i tried to do the same as below)

----

var query = xtk.queryDef.create(

         <queryDef schema={vars.targetSchema} operation="select">

          <select>

            <node expr="@id"/>

            <node expr="@email"/>

          </select>

         </queryDef>);

var res = query.ExecuteQuery();

function doStuff(item){

  return 'stuff_done';

}

for each (var item in res)

  sqlExec("UPDATE " + vars.tableName + " SET sEmail='"+ doStuff(item) +"' where iId=" + item.@id);

---

You just need to find your column names in SQL by exploring targeting dimension.

1474686_pastedImage_21.png

Result --

1474687_pastedImage_22.png

Marcel