When I have two sql files, one of them in a subdirectory
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 a subdirectory
sub> sqlplus xxx @ sub_test.sql
But when I call
sub> cd .. > sqlplus xxx @ sub/sub_test.sql
This leads to
SP2-0310: unable to open file "../main_test.sql"
since the path is evaluated from my working directory, not the SQL directory of the file that I am calling.
Is there a way to use relative paths starting from the directory of the file containing the call?
sql oracle10g sqlplus
Peter Lang
source share