String Operators

These string operators are available in Sybase IQ.

String operators

Operator

Description

expression || expression

String concatenation (two vertical bars). If either string is the NULL value, the string is treated as the empty string for concatenation.

expression + expression

Alternative string concatenation. When using the + concatenation operator, you must ensure the operands are explicitly set to character data types rather than relying on implicit data conversion.

The result data type of a string concatenation operator is a LONG VARCHAR. If you use string concatenation operators in a SELECT INTO statement, you must have an Unstructured Data Analytics Option license or use CAST and set LEFT to the correct data type and size.

Standards and Compatibility

  • SQL—ISO/ANSI SQL compliant. The || operator is the ISO/ANSI SQL string concatenation operator.

  • Sybase—The + operator is supported by Adaptive Server Enterprise.

Related reference
REVERSE Function [String]