Closed markuman closed 2 years ago
@markuman Hi, apologies I didn't see this sooner. usql
most definitely supports any query. The issue is that Oracle expects this to be executed as a single block, and usql
has no understanding of a block. It can only detect when a query is complete when it finds a semi-colon.
Long/short: you need to escape your semi-colons with the backslash:
$ usql or://
Connected with driver oracle (Oracle Database 21.0.0.0.0)
Type "help" for help.
or:system@localhost/orasid=> DECLARE
or:system@localhost/orasid-> l_message VARCHAR2( 255 ) := 'Hello World!'\;
or:system@localhost/orasid-> BEGIN
or:system@localhost/orasid-> DBMS_OUTPUT.PUT_LINE( l_message )\;
or:system@localhost/orasid-> END;
DECLARE 1
or:system@localhost/orasid=> \p
DECLARE
l_message VARCHAR2( 255 ) := 'Hello World!';
BEGIN
DBMS_OUTPUT.PUT_LINE( l_message );
END;
or:system@localhost/orasid=>
usql
has supported this for about 2 years or more I believe. I don't recall when I specifically added this, but more than one database that requires declarations like this make use of it.
It looks like usql dosn't support oracle PL/SQL blocks