Idea Details

Enhance Datacom SQL syntax to include the TRANSLATE function

Last activity 30 days ago
Owen Williams's profile image
08-19-2019 03:51 PM

Currently the Datacom SQL implementation only allows the fixed UPPERCASE and LOWERCASE translations. We request that Datacom SQL be enhanced to include the TRANSLATE function that is common in most other SQL implementations.

The TRANSLATE() function returns the string from the first argument after the characters specified in the second argument are translated into the characters specified in the third argument.

Syntax

TRANSLATE(string, characters, translations)

Parameter Values

Parameter Description
string Required. The input string
characters Required. The characters that should be replaced
translations Required. The new characters

Example

Return the string from the first argument AFTER the characters specified in the second argument are translated into the characters specified in the third argument:

SELECT TRANSLATE('3*[2+1]/{8-4}', '[]{}', '()()'); // Results in 3*(2+1)/(8-4)