TRIM_BOTH (Lakehouse v1)
Removes all occurrences of the specified trim string from the beginning, end, or both sides of the string.
See also: TRIM
Analyze Syntax
Section titled “Analyze Syntax”func.trim_both(<string>, <trim_string>)Analyze Examples
Section titled “Analyze Examples”func.trim_both('xxdatabendxx', 'x')┌──────────────────────────────────────┐│ func.trim_both('xxdatabendxx', 'x') │├──────────────────────────────────────┤│ databend │└──────────────────────────────────────┘SQL Syntax
Section titled “SQL Syntax”TRIM_BOTH(<string>, <trim_string>)SQL Examples
Section titled “SQL Examples”SELECT TRIM_BOTH('xxdatabendxx', 'xxx'), TRIM_BOTH('xxdatabendxx', 'xx'), TRIM_BOTH('xxdatabendxx', 'x');
┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐│ trim_both('xxdatabendxx', 'xxx') │ trim_both('xxdatabendxx', 'xx') │ trim_both('xxdatabendxx', 'x') │├──────────────────────────────────┼─────────────────────────────────┼────────────────────────────────┤│ xxdatabendxx │ databend │ databend │└─────────────────────────────────────────────────────────────────────────────────────────────────────┘