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

1.9k views Asked by At

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?

2

There are 2 answers

0
AJPerez On BEST ANSWER

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.

5
Rahul Tripathi On

You can use OR like this:

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

but I think using IN is better than using OR.

Other than using IN or OR you dont have any option.