When I have two sql-files, one of them in a sub-directory
main_test.sql
sub/sub_test.sql
and sub_test.sqlcalls @../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:
put the whole directory structure under a Tomcat webapps/ROOT context and it works if you call like this:
Probably a bit of overkill setting up a web-server I guess ?? (Also works with FTP apparently – not tried it).