String Functions
| Name and Description |
|---|
base64(target: blob): stringConverts a blob to a base64 encoded string. |
btrim(target: string, characters: string = ' '): stringRemove the longest string consisting only of characters in characters from the start and end of string. |
from_base64(target: string): blobConverts a base64 encoded string to a character string (BLOB). |
length(target: string): integerchar_length(target: string): integercharacter_length(target: string): integerNumber of characters in string. |
lower(target: string): stringConvert a string to lower case. |
ltrim(target: string, characters: string = ' '): stringRemoves the longest string containing only characters in characters from the start of string. |
position(substring: string, target: string): integerReturns first starting index of the specified substring within string, or zero if it's not present. |
regexp_count(target: string, pattern: string, start?: integer = 1), flags?: string := null: stringReturns the number of times the regular expression pattern matches in the string. |
regexp_replace(target: string, pattern: string, replacement: string, start?: integer = 1, flags?: string := null): stringProvides substitution of new text for substrings that match regular expression patterns. |
regexp_split_to_table(target: string, pattern: string, flags?: string := null): object<IRowsIterator>Splits string using a regular expression as the delimiter, producing a set of results. |
regexp_substr(target: string, pattern: string, start?: integer = 1, n?: integer = 1, subexpr?: integer = 1, flags?: string := null): stringReturns the substring within string that matches the N'th occurrence of the regular expression pattern, or NULL. |
replace(target: string, old: string, new: string): stringReplaces all occurrences in string of substring from with substring to. |
reverse(target: string): stringReverses the order of the characters in the string. |
rtrim(target: string, characters: string = ' '): stringRemoves the longest string containing only characters in characters from the end of string. |
split_part(target: string, delimiter: string, n: integer): stringSplits string at occurrences of delimiter and returns the n'th field (counting from one). |
starts_with(target: string, prefix: string): booleanReturns true if string starts with prefix. |
string_to_table(target: string, delimiter?: string, null_string?: string := null): object<IRowsIterator>Splits the string at occurrences of delimiter and returns the resulting fields as a set of text rows. |
substr(target: string, start: integer, count?: integer): stringExtracts the substring of string starting at the start'th character, and extending for count characters if that is specified. |
to_char(args: any, fmt?: string): stringConvert value to string according to the given format. |
to_base64(target: blob): stringConverts a blob to a base64 encoded string. |
upper(target: string): stringConvert a string to upper case. |
SQL Standard
There are SQL standard regular expression functions that are partially supported:
| SQL Standard | Alternative |
|---|---|
OCCURRENCES_REGEX(pattern IN string) |
regexp_count(string, pattern) |
SUBSTRING_REGEX(pattern IN string) |
regexp_substr(string, pattern) |
TRANSLATE_REGEX(pattern IN string WITH replacement) |
regexp_replace(string, pattern, replacement) |
Regular Expression Flags
| Option | Description |
|---|---|
i |
case-insensitive matching |
m, n |
multiline |
s |
single line |