Drools-等效于“ not in” SQL

时间:2019-11-25 13:35:06

标签: java drools

我有两个表A和B。如果它与表B中的B列不匹配,我想更新表A中的A列。

我写了以下内容,但是不起作用。

rule "Lookup"

when
  B($colB: colB)
  $a : A($colB not contains colA)

then 
  modify($a){
   setcolA(1000)
 }
end

我也尝试使用累加,但徒劳无功。任何建议都将受到高度赞赏。

在SQL中等于

Update colA set colA =1000 from A where colA not in (Select colB from B)

0 个答案:

没有答案