Dynamically set the name of the spool file

by Granville Bonyata on October 30, 2014

In SQPlus you can dynamically set the spool file:

COLUMN script_name new_val script_name
SELECT ‘&file_path’ AS script_name FROM dual;

SPOOL &script_name

SELECT * FROM dual;

SPOOL OFF

Previous post:

Next post: