Table of Contents

Search

  1. Preface
  2. The Transformation Language
  3. Constants
  4. Operators
  5. Variables
  6. Dates
  7. Functions
  8. Creating Custom Functions
  9. Custom Function API Reference

Transformation Language Reference

Transformation Language Reference

SQRT

SQRT

Returns the square root of a non-negative numeric value.

Syntax

SQRT(
numeric_value
)
The following table describes the argument for this command:
Argument
Required/
Optional
Description
numeric_value
Required
Positive numeric value. Passes the values for which you want to calculate a square root. You can enter any valid transformation expression.

Return Value

Double value.
NULL if a value passed to the function is NULL.

Example

The following expression returns the square root for the values in the Numbers port:
SQRT( NUMBERS )
NUMBERS 
RETURN VALUE
100
10
-100
Error.
PowerCenter Integration Service
does not write row.
NULL
NULL
60.54
7.78074546557076
The value -100 results in an error, since the function SQRT only evaluates positive numeric values. If you pass a negative value or character value, the
PowerCenter Integration Service
displays a Transformation Evaluation Error and does not write the row.
You can perform arithmetic on the values passed to SQRT before the function calculates the square root.

0 COMMENTS

We’d like to hear from you!