2

I have following script hierarchy.

Scripts/master.sql
Scripts/GB/gb.sql
Scripts/GB/user1/insert.sql

master.sql contains simple @script to call gb.sql e.g.

@GB/gb.sql

gb.sql contains below

@user1/insert.sql

The problem is that if i run master.sql from Scripts directory, i get below error:

unable to find insert.sql

Whereas if I execute gb.sql from GB directory, ir run successfully. Can you please help me?

1 Answer 1

3

SQL*Plus directories are always reletive to the original working directory. Your scripts will need to repeat the full path from the working directory each time.

Change gb.sql to:

@GB/user1/insert.sql

The @@ can be used to reference files in the same directory as the running file, but @@ does not work with sub directories.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.