-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
`TRIM` can be constructed in several forms: TRIM( [ [ { LEADING | TRAILING | BOTH } ] [ trim_character ] FROM ] trim_source ) If `LEADING`, `TRAILING` or `BOTH` is not provided, `BOTH` is used. If `trim_character` is not provided, a space (`' '`) is used. VALUES TRIM(' hello world '); -- COL1: hello world VALUES TRIM('a' FROM 'aaababccaa'); -- COL1: babcc VALUES TRIM(LEADING 'a' FROM 'aaababccaa'); -- COL1: babccaa VALUES TRIM(TRAILING 'a' FROM 'aaababccaa'); -- COL1: aaababcc
- Loading branch information
1 parent
f84fb96
commit ab3a5e7
Showing
10 changed files
with
413 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
EXPLAIN VALUES TRIM('aaababccaa'); | ||
-- EXPLAIN: VALUES (COL1 CHARACTER VARYING) = ROW(TRIM(BOTH ' ' FROM 'aaababccaa')) | ||
|
||
EXPLAIN VALUES TRIM(FROM 'aaababccaa'); | ||
-- EXPLAIN: VALUES (COL1 CHARACTER VARYING) = ROW(TRIM(BOTH ' ' FROM 'aaababccaa')) | ||
|
||
EXPLAIN VALUES TRIM(LEADING FROM 'aaababccaa'); | ||
-- EXPLAIN: VALUES (COL1 CHARACTER VARYING) = ROW(TRIM(LEADING ' ' FROM 'aaababccaa')) | ||
|
||
EXPLAIN VALUES TRIM(TRAILING FROM 'aaababccaa'); | ||
-- EXPLAIN: VALUES (COL1 CHARACTER VARYING) = ROW(TRIM(TRAILING ' ' FROM 'aaababccaa')) | ||
|
||
EXPLAIN VALUES TRIM(BOTH FROM 'aaababccaa'); | ||
-- EXPLAIN: VALUES (COL1 CHARACTER VARYING) = ROW(TRIM(BOTH ' ' FROM 'aaababccaa')) | ||
|
||
EXPLAIN VALUES TRIM('a' FROM 'aaababccaa'); | ||
-- EXPLAIN: VALUES (COL1 CHARACTER VARYING) = ROW(TRIM(BOTH 'a' FROM 'aaababccaa')) | ||
|
||
EXPLAIN VALUES TRIM(LEADING 'a' FROM 'aaababccaa'); | ||
-- EXPLAIN: VALUES (COL1 CHARACTER VARYING) = ROW(TRIM(LEADING 'a' FROM 'aaababccaa')) | ||
|
||
VALUES TRIM('aaababccaa'); | ||
-- COL1: aaababccaa | ||
|
||
VALUES TRIM(FROM 'aaababccaa'); | ||
-- COL1: aaababccaa | ||
|
||
VALUES TRIM(LEADING FROM 'aaababccaa'); | ||
-- COL1: aaababccaa | ||
|
||
VALUES TRIM(TRAILING FROM 'aaababccaa'); | ||
-- COL1: aaababccaa | ||
|
||
VALUES TRIM(BOTH FROM 'aaababccaa'); | ||
-- COL1: aaababccaa | ||
|
||
VALUES TRIM('a' FROM 'aaababccaa'); | ||
-- COL1: babcc | ||
|
||
VALUES TRIM(LEADING 'a' FROM 'aaababccaa'); | ||
-- COL1: babccaa | ||
|
||
VALUES TRIM(TRAILING 'a' FROM 'aaababccaa'); | ||
-- COL1: aaababcc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.