Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有谁知道我们如何根据搜索规范中的多个值过滤 BC 结果?作为INSQL 中的关键字?就像是:
IN
bc.SetSearchExpr("[Id] in ('a','b','c')");
还是使用OR运算符是唯一的解决方案?
OR
不,您不能IN在 Siebel 中使用,它不是有效的搜索运算符。但至少,您可以通过使用搜索规范而不是搜索表达式来简化表达式。这两行完全一样:
bc.SetSearchExpr("[Id]='a' or [Id]='b' or [Id]='c'"); bc.SetSearchSpec("Id", "='a' OR ='b' OR ='c'");
请注意,您不能同时SetSearchSpec使用和SetSearchExpr方法。
SetSearchSpec
SetSearchExpr
您可以像这样使用 OR:
bc.SetSearchExpr("[Id] = 'a' or [Id] ='b' or [Id] ='c')");
但我认为 usingIN比 using 更好OR。
除了使用IN或者OR你没有任何选择。