Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space DEV and version r097

D toc

Excerpt

Returns true if the first argument is equal to the second argument. Equivalent to the = operator.

  • Each argument can be a literal String, Integer or Decimal number, a function, or a column reference.

Since the function returns a Boolean value, it can be used as a function or a conditional.

Info

NOTE: Within an expression, you might choose to use the corresponding operator, instead of this function. For more information, see Comparison Operators.

D s lang vs sql
 

D s
snippetBasic

D lang syntax
RawWrangletrue
Typeref
showNotetrue
WrangleTextderive type:single value: if(equal(errorCount, 0),'ok','Error_recorded') as:'status'

if(equal(errorCount, 0),'ok','Error_recorded')

Output: If the value in the errorCount column is zero, then the status column value is ok. Otherwise, the value is Error_recorded

D s
snippetSyntax

D lang syntax
RawWrangletrue
Typesyntax
showNotetrue
WrangleTextderive type:single value:equal(value1, value2)

equal(value1, value2)


ArgumentRequired?Data TypeDescription
value1YstringThe first value. This value can be a String, a number, a function, or a column reference.
value2YstringThe second value. This value can be a String, a number, a function, or a column reference.

D s lang notes

value1, value2

Names of the columns, expressions, or literals to compare.

  • Missing values generate missing string results.

D s
snippetusage

Required?Data TypeExample Value
YesColumn reference, function, or numeric or String valuemyColumn

D s
snippetExamples

Example - Basic Equal and Notequal Functions

Include Page
EXAMPLE - Comparison Functions Equal
EXAMPLE - Comparison Functions Equal

D s also
labelcomparison