15.9 Using String Functions

The following String functions are supported in this release:

Function Name Description

coalesce(value1,...)

Returns the first non-null expression in the list. If all expressions evaluate to null, then the COALESCE function will return null

concat(value1,...)

Returns concatenation of values converted to strings

indexof(string,match)

Returns first index of \'match\' in \'string\'or 1 if not found 

initcap(value1)

Returns a specified text expression, with the first letter of each word in uppercase and all other letters in lowercase

length(value1)

Returns the length of the specified string

like(value1,value2)

Returns a matching pattern

lower(value1)

Converts the given string to lower case

lpad(value1,value2,value3)

Pads the left side of a string with a specific set of characters (when string1 is not null)

ltrim(value1,value2)

Removes all specified characters from the left hand side of a string

replace(string,match,replacement)

Replaces all \'match\' with \'replacement\' in \'string\'

rpad(value1,value2,value3)

Pads the right side of a string with a specific set of characters (when string1 is not null)

rtrim(value1,value2)

Removes all specified characters from the right hand side of a string

substr(string,from)

Returns substring of a 'string' when indices are between 'from' (inclusive) and up to the end of the string

substring(string,from,to)

Returns substring of a \'string\' when indices are between \'from\' (inclusive) and \'to\' (exclusive)

translate(value1,value2,value3)

Replaces a sequence of characters in a string with another set of characters. However, it replaces a single character at a time.

upper(value1)

Converts given string to uppercase