SQL: Implement TRIM function (#57518)

Add `TRIM` function which combines the functionality of both
`LTRIM` and `RTRIM` by stripping both leading and trailing
whitespaces.

Refers to #41195
This commit is contained in:
Marios Trivyzas 2020-06-03 14:24:30 +02:00 committed by GitHub
parent a9338672c5
commit 6c86c919e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 200 additions and 12 deletions

View file

@ -129,6 +129,7 @@
** <<sql-functions-string-rtrim>>
** <<sql-functions-string-space>>
** <<sql-functions-string-substring>>
** <<sql-functions-string-trim>>
** <<sql-functions-string-ucase>>
* <<sql-functions-type-conversion>>
** <<sql-functions-type-conversion-cast>>

View file

@ -477,6 +477,26 @@ SUBSTRING(
--------------------------------------------------
include-tagged::{sql-specs}/docs/docs.csv-spec[stringSubString]
--------------------------------------------------
[[sql-functions-string-trim]]
==== `TRIM`
.Synopsis:
[source, sql]
--------------------------------------------------
TRIM(string_exp) <1>
--------------------------------------------------
*Input*:
<1> string expression
*Output*: string
*Description*: Returns the characters of `string_exp`, with leading and trailing blanks removed.
[source, sql]
--------------------------------------------------
include-tagged::{sql-specs}/docs/docs.csv-spec[stringTrim]
--------------------------------------------------
[[sql-functions-string-ucase]]
==== `UCASE`