1

I would like to execute sql script through the use of bind variable because the file name will be known during runtime.

Like:

:name := 'test.sql';
@:name;

Help please.

1 Answer 1

1

Finally managed to get the file name by:

column col_name new_val var_name;

:name := 'test.sql';
select :name as col_name
from dual;

@&var_name;

Ref: Dynamic Spool File Name

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.