Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

How to execute a sql script from a sub directory?

5108Sep 13 2007 — edited Sep 13 2007
Hi,

I have the following directories & files.

c:\oracle\
install.sql
tablescript\
loadtable.sql
table1.sql
table2.sql

Contents of install.sql file:
@tablescript\loadtable.sql;

Contents of loadtable.sql file:
@table1.sql;
@table2.sql;

However, when I run install.sql, sqlplus complaints unable to find the file loadtable.sql.

So, my question is how to make my install.sql able to execute loadtable.sql.

Of course, it can work if i hardcode the full path to @c:\oracle\tablescript\loadtable.sql and but I would like to know how to get it work without hardcode the path.

Please advise.

Thanks.

Regards,
Jap.

Message was edited by:
bchurn
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 11 2007
Added on Sep 13 2007
6 comments
1,818 views