I am trying to fill TablA, based on a Join and a certain criteria on the joining table, I have tried the following 2 jobs based on some examples i have found. But I'm not sure how to fill the table, while keeping the Job simple.
I have tried the following jobs, but both give me a syntax error:
static void AddDescription(Args _args)
{
TableA tableA;
InventTable inventTable;
str info;
;
ttsBegin;
insert_recordSet tableA
setting
tableA.ItemId = inventTable.ItemId;
tableA.Description = 'DescriptionHere';
join ItemId from inventTable
where TableA.ItemId == inventTable.ItemId &&
where CriteriaA == CriteriaValueA;
tableA.insert();
ttsCommit;
info("Done!");
}
I also have tried the following job:
static void AddDescription(Args _args)
{
TableA tableA;
InventTable inventTable;
str info;
;
ttsBegin;
insert_recordSet tableA
join ItemId from inventTable
where CriteriaA == CriteriaValueA;
tableA.ItemId = inventTable.ItemId;
tableA.Description = 'DescriptionHere';
tableA.insert();
ttsCommit;
info("Done!");
}
Obviously I'm missing a big step, can anyone give me a direction to finish this job?