Skip to content

v0.22.2

Compare
Choose a tag to compare
@elliotchance elliotchance released this 15 Jul 00:29
· 64 commits to main since this release
ab3a5e7
E021-09: TRIM function (#114)

`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