我想检查两个不同的表,然后忽略输出中的匹配结果。 示例:如果具有 Source1 的 Table1 具有名称“ABC”以及编号“123”或“456”,同时如果具有 Source1 的 Table2 具有 Type ==“Misc”,则忽略匹配项并返回其他所有内容。谢谢
示例:
Table 1
| where Source = 1 and Name == "ABC" and Number in ("123", "456")
Table 2
| where Source = 1 and Type == "Misc"
您可以先做一个
anti join
,然后做一个union
:
union(
Table1
| join kind=anti(
| Table1
| where Source = 1 and Name == "ABC" and Number in ("123", "456")
) on Id,
Table2
| join kind=anti(
Table2
| where Source = 1 and Type == "Misc"
) on Id)