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
ESCAPE <expression> must not interpret Escape codes. #1638
ESCAPE <expression> must not interpret Escape codes.
-- failsselect case
when id_portfolio like'%\_1' escape '\' then '1' end;-- worksselect case when id_portfolio like '%\_1' then '1' end;-- worksselect *from dualwhere id_portfolio like '%\_1' escape '\';
Odd enough even GitHub Syntax highlighting gets confused?!
I understand better, what is going on: the sequence ESCAPE '\' collides with the <ESC> token defined in the Grammar.
In the result, the Escape Expression becomes <S_CHARLITERAL> = '\' then '1' (including the <ESC> Token).
A kind ofUNESCAPED CHAR LITERAL will also not work because the LONGEST MATCH is chosen over the shortest match.
Activity
manticore-projects commentedon Sep 24, 2022
It gets stranger by the minute:
This works in JSQLParser but is invalid on oracle: "ORA-01425: escape character must be character string of length 1"
manticore-projects commentedon Oct 14, 2022
I understand better, what is going on: the sequence
ESCAPE '\'collides with the<ESC> tokendefined in the Grammar.In the result, the Escape Expression becomes
<S_CHARLITERAL> = '\' then '1'(including the<ESC>Token).A kind of
UNESCAPED CHAR LITERALwill also not work because the LONGEST MATCH is chosen over the shortest match.[-]CASE WHEN has problem with LIKE ESCAPE[/-][+]ESCAPE <expression> must not interpret Escape codes.[/+]feat: Configurable backslash `\` escaping
Assorted Fixes #5 (#1715)