You are viewing the documentation for Blueriq 17. Documentation for other versions is available in our documentation directory.

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

EQUAL


The operator '=' compares two values and returns the boolean value TRUE if the left value is equal to the right value and FALSE otherwise.


Syntax

 value1 = value2
  • value1 - Number, date or attribute of some type of number or date.

  • value2 - Number, date or attribute of some type of number or date.


When one or both values are a set, the '=' operator is translated to SUBSET OF:

  • "a" = ["a", "b"] is equivalent to "a" SUBSET OF ["a","b"], which returns true
  • ["a", "b"] = "a" is also equivalent to "a" SUBSET OF ["a","b"], note that the arguments are switched. Because we have a set and a single value, there is only one way to interpret this with the SUBSET OF function.
  • ["a"] = ["a", "b"] is equivalent to ["a"] SUBSET OF ["a","b"], which returns true
  • ["a", "b"] = ["a"] is equivalent to ["a", "b"] SUBSET OF ["a"], which returns false. (note that if "set1 = set2" returns true, it does not mean that "set2 = set1" will also return true)

To test if two sets are equal you could use the expression:

L1 SUBSET OF L2 AND L2 SUBSET OF L1


Return type

  • boolean


Examples

ExpressionResultType
1 = 2FALSEBoolean

1.0 = 1.0

TRUEBoolean
DATE( 2012 , 1 , 1 ) = TODAYFALSEBoolean
5 + 5 = 10TRUEBoolean


  • No labels