Show TOC

Procedure documentationList of Comparator Choices for a Decision Table Locate this document in the navigation structure

 

Comparator

How to use

In

Can be used in condition values in the following format: In a, b, c.

A condition gets satisfied if its LValue equals any one of the comma separated values which follow “In” comparator.

In 200, 300, 300 (for numeric values such as for int, float, double, and so on) IN Good, Bad, Moderate (for enum type where only the existing enum values can be assigned to the condition)

‘In’ comparator can be used with all except Boolean data type. A condition gets satisfied if the input value equals any one of the comma separated values which follow “In” comparator.

Not In

Can be used in condition values in the following format :Not In a, b, c

“Not In” comparator can be used both in strings and numeric condition values.

“Not In” comparator can be used with all except Boolean data type.

Between

Can be used in condition values in the following format: Between 5 and 10.

It is inclusive of boundary values. “Between” comparator can be used for numeric value but not for string condition value.

Like

Can be used in condition values in the following formats:

  • Like a

  • Like *

  • Like ab*

  • Like ab*c*

  • Like ab*c*d*ee

“Like” comparator looks for a pattern-match between LValue of the condition and the value that follows it.

If Lvalue of a condition is “abcdef”, then following are the expected results:

  • Like * returns true

  • Like ab* returns true

  • Like ab*e returns false

  • Like ab*d* returns true

This comparator can only be used with string condition value but not with numeric condition value.

Not Like

Can be used in condition values in the following formats:

  • Not Like a

  • Not Like *

  • Not Like ab*

  • Not Like ab*c*

  • Not Like ab*c*d*ee

“Not Like” operator looks for a pattern-mismatch between LValue of the condition and the value that follows it.

If LValue of a condition is “abcdef”, then following are the expected results:

  • Not Like * returns false

  • Not Like ab* returns false

  • Not Like ab*e returns true

  • Not Like ab*d* returns false

This operator can only be used with string condition value but not with numeric condition value.

>, >= , <, <=

Can be used in condition values in the following format:

  • > 10

  • > = 10

  • < 20

  • < = 20

The Logical operator ‘and’ can be used in conjunction as follows: >10 and <20 (OR) >=10 and <=20 (Same as Between) These comparators can be used with all except Boolean data type. We can use “or” logical operator also. We can give complex ranges such as: ((>=10 and <=20) OR (>=40 and <=50))

=

Can be used in condition values in the following format:

  • 20

  • Joe

These are equivalent to :

  • = 20

  • = Joe

  • = true

For Boolean this is the only comparator that is supported.

!=

Can be used in condition values in the following format:

  • !=20 (numeric condition value)

  • !=Joe (String condition value)

This comparator can be used for String and numeric types.