是否可以对 MAPITable 的 ExecSQL 主题进行 NOT LIKE 筛选?展望救赎

Is it possible to make a NOT LIKE filter on the ExecSQL subject of a MAPITable? Outlook Redemption

是否可以对 MAPITable 的 ExecSQL 主题进行 NOT LIKE 筛选?

我正在做这个过滤器:

MAPITable mt = session.Stores.MAPITable;
mt.Item = inbox.Items;
var records = mt.ExecSQL($"select Subject, EntryID from Inbox Where Subject not like '%[DocSite %'");

但我有这个例外:

An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in ConsoleApplication1.exe

Additional information: Assertion failed: Number of fields == 1

如果我删除 NOT 约束,类似的过滤器就会应用并起作用。问题是NOT约束。

您是否试过像下面这样将括号括起来并将 not 运算符移出? $"select Subject, EntryID from Inbox Where not (Subject like '%[DocSite %') "