When I have two sql-files, one of them in a sub-directory
main_test.sql
sub/sub_test.sql
and sub_test.sql
calls @../main_test.sql
(or @@../main_test.sql
) then this works fine when executing it from the sub-directory
sub> sqlplus xxx @ sub_test.sql
But when I call
sub> cd ..
> sqlplus xxx @ sub/sub_test.sql
this results in
SP2-0310: unable to open file "../main_test.sql"
since the path is evaluated from my working directory, not the directory of the sql-file I call.
Is there a way to use relative paths starting from the directory of file containing the call?
Shame the 'file' url isn't supported - since this actually works very well when using 'http://' paths !
I set up 'sub_test\sub_test.sql' to contain the double-ats:
@@../main.sql
put the whole directory structure under a Tomcat webapps/ROOT context and it works if you call like this:
SQL> @http://host:port/sub_test/sub_test.sql
Probably a bit of overkill setting up a web-server I guess ?? (Also works with FTP apparently - not tried it).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With