sqlcl does not keep you in the directory where you launched it from.
Here is the problem I face:
I am in C:\a\b\c where I have a sql script, d.sql.
sqlcl executable is in c:\opt\sqlcl\bin (this is in my PATH)
d.sql is like the following:
set sqlformat csv;
set term off;
spool o.csv;
select table_name from tabs;
spool off;
quit
when I execute:
C:\a\b\c> sql usr/pwd@db @d
I get an error because d.sql is not found.
If I go through the interactive session it is because sqlcl sets the working directory to c:\opt\sqlcl\bin and yes there, there is no d.sql
So I launch it as follows:
C:\a\b\c> sql usr/pwd@db @c:\a\b\c\d
all works fine BUT for the fact that the spooled file is in c:\opt\sqlcl\bin
The fact of having to specify the full path for @<file> or for spool is like inconvenient, the default for no absolute path should be the directory from where you launched the application (and any explicit cd you explicitly perform in your script of course)
Please advise
Thank you a lot in advance
BR