Search code examples
sqlvbscriptsiebelescript

Alternative of IN keyword of SQL in Siebel Server scripting for search spec?


Does anyone know how can we filter BC results based on multiple values in search specification? As IN keyword in SQL ? something like:

bc.SetSearchExpr("[Id] in ('a','b','c')"); 

Or use of OR operator is the only solution?


Solution

  • No, you can't use IN in Siebel, it's not a valid search operator. But at least, you can simplify your expression by using a search specification instead of a search expression. These two lines do exactly the same:

    bc.SetSearchExpr("[Id]='a' or [Id]='b' or [Id]='c'");
    
    bc.SetSearchSpec("Id", "='a' OR ='b' OR ='c'");
    

    Note that you can't use both SetSearchSpec and SetSearchExpr methods simultaneously.