String expressions

This section covers string expression evaluation rules.

A string expression includes at least one character string value and evaluates to a string data type value.

MAIN
  DEFINE r, c VARCHAR(100)
  LET c = "abcdef" 
  LET r = c[1,3] || ": " || TODAY USING "YYYY-MM-DD" || " " || length(c)
END MAIN

The data type of string expression result is STRING.

At least one of the operands in a string expression must be one of:

Other operands whose values are not character string data types are converted to strings by following the data conversion rules.

If an element of a string expression is NULL, the expression is evaluated to NULL.

An empty string ("") is equivalent to NULL.