-
Notifications
You must be signed in to change notification settings - Fork 20
Description
SQuirreL 4.7.1 with ojdbc11 on Ubuntu 22.04 connected to Oracle 19c gives a ORA-0090x error stack (pls see below) for ...
with FUNCTION leftAlign(val VarChar2) return VarChar2 is
begin
return val;
end;
select leftAlign('xxx') from dual
/
which is a completely valid statement since 12.1.0.1 (see also Oracle Blog). Compatibility shouldn’t be a problem (all test sessions report 19.0.0
from v$parameter
).
Only when I either change the Statement Separator from ;
to /
, or completely disable the Custom Query Tokenizer the statement would work.
Corr: Only when I change the Statement Separator from ;
to /
—or better §
… which is less likely to be used in queries—the statement would work. Disabling the Custom Query Tokenizer doesn’t help either (no idea, why I thought it worked on April 11).
BTW: /
as statement separator renders queries like select 1/2 from dual
invalid.
Expected behavior: the statement works, regardless of tokenizer settings.
Also tested the very same statement with two other JDBC based SQL-Clients (one even with the very same ojdbc11 as SQuirreL).
Both clients accepted the statement gracefully and the 19c database answered as expected.
The error stack mentioned above is ...
Error : 905, Position : 15, Sql = with FUNCTION leftAlign(val VarChar2) return VarChar2 is
begin
return val
, OriginalSql = with FUNCTION leftAlign(val VarChar2) return VarChar2 is
begin
return val
, Error Msg = ORA-00905: missing keyword
Error occurred in:
with FUNCTION leftAlign(val VarChar2) return VarChar2 is
begin
return val
Error : 900, Position : 0, Sql = end
, OriginalSql = end
, Error Msg = ORA-00900: invalid SQL statement
Error occurred in:
end
Error : 904, Position : 7, Sql = select leftAlign('xxx') from dual
, OriginalSql = select leftAlign('xxx') from dual
, Error Msg = ORA-00904: "LEFTALIGN": invalid identifier
Error occurred in:
select leftAlign('xxx') from dual
Edit Apr 11, 2024: corrected wrong information