You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TRIM(LEADING | TRAILING | BOTH ... FROM x) is a parse error #2800
The SQL-92 form TRIM([LEADING | TRAILING | BOTH] [chars] FROM x) is a parse error. TRIM(x) works.
Seen in the NIST SQL Test Suite run: 6 checks in dml112.sql (TRIM (LEADING ' ' FROM SPONSOR)). Reproduced on develop (38bf3c3):
alasql("SELECT TRIM(' xy ') AS x");// [{x: 'xy'}]alasql("SELECT TRIM(LEADING ' ' FROM ' xy ') AS x");// Parse erroralasql("SELECT TRIM(TRAILING FROM ' xy ') AS x");// Parse erroralasql("SELECT TRIM(BOTH 'z' FROM 'zzxyz') AS x");// Parse erroralasql("SELECT TRIM('z' FROM 'zzxyz') AS x");// Parse error
Expected: 'xy ', ' xy', 'xy' and 'xy'. Without a character the default is a space, and without LEADING, TRAILING or BOTH the default is BOTH.
Activity
mateuscmtropical commentedon Nov 11, 2026
Hi, I'd like to work on this one.
mateuscmtropical commentedon Nov 11, 2026
Hi, I've opened a PR for this: #3042