Rule Engine NOT EQUAL operator

Hi,
I wonder why in the rule engine node lacks the comparison operator “Not equal” (e.g. <>, ~ =, ^=, …)
Cheers
Alfredo

1 Like

Hello @alfroc,

I used the following script within the Rule Engine node and it worked (use parentheses):
NOT ($column1$ = $column2$) => TRUE

colum1, column2
1,1
2,3
3,0
The result is true for the last 2 rows as shown below.

image

If no rule matches, the outcome is a missing value.

cpadilla

3 Likes

Thank you, Cpadilla!

1 Like

As I remember the parentheses at that position is optional, so NOT $column1$ = $column2$ => 2 would work the same. Though the NOT cannot be used in infix position, so $column1$ NOT = $column2$ is not allowed.

Regarding the non-existent not-equals operator: probably because there is not a single commonly used one.

1 Like

Hi aborg,

<> is a standard SQL-92 operator; != is non standard, but most software companies implemented it.

Knime developers should take this into account.

4 Likes