String Functions

String functions perform various operations on character strings, expressions, and sometimes on binary data.

When you use constants with a string function, enclose them in single or double quotation marks. You can concatenate binary and character expressions, and nest them.

Most string functions can be used only on char, nchar, unichar, varchar, univarchar, and nvarchar datatypes and on datatypes that implicitly convert to char, unichar, varchar, or univarchar. A few string functions can also be used on binary and varbinary data. patindex can be used on text, unitext, char, nchar, unichar, varchar, nvarchar, and univarchar columns.

Each function also accepts arguments that can be implicitly converted to the specified type. For example, functions that accept approximate numeric expressions also accept integer expressions. SAP ASE automatically converts the argument to the desired type.

Related concepts
Concatenating Expressions
Nest String Functions