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 r096

D toc

Excerpt

Computes the square root of the input parameter.  Input value can be a Decimal or Integer literal or a reference to a column containing numeric values. All generated values are non-negative.

D s lang vs sql

D s
snippetBasic

Numeric literal example:

D lang syntax
RawWrangletrue
Typeref
showNotetrue
WrangleTextderive type:single value:sqrt(25)

sqrt(25)

Output: Returns the square root of 25, which is 5.

Column reference example:

D lang syntax
RawWrangletrue
Typeref
showNotetrue
WrangleTextderive type:single value:sqrt(MyValue) as: 'sqroot_MyValue'

sqrt(MyValue)

Output: Returns the square root of the values of the MyValue column. 

D s
snippetSyntax

D lang syntax
RawWrangletrue
Typesyntax
showNotetrue
WrangleTextderive type:single value:sqrt(numeric_value)

sqrt(numeric_value)


ArgumentRequired?Data TypeDescription
numeric_valueYstring, decimal, or integerName of column or Decimal or Integer literal to apply to the function

D s lang notes

numeric_value

Name of the column or numeric literal whose values are used to compute the square root.

Info

NOTE: Negative input values generate null output values.

  • Missing input values generate missing results.
  • Literal numeric values should not be quoted. 
  • Multiple columns and wildcards are not supported.

D s
snippetusage

Required?Data TypeExample Value
YesString (column reference) or Integer or Decimal literal25

D s
snippetExamples

Example - Pythagorean Theorem

Include Page
EXAMPLE - POW and SQRT Functions
EXAMPLE - POW and SQRT Functions

D s also
labelmath