I am using Command Prompt to run SQL Scripts. One of the script requires a file name which is read from a settings file (file_name=ABC) by CMD and feed to the script like so
sqlplus @"Script_Run" %file_name%
Inside the script the input is read in the line:
UTL_FILE.FOPEN('DIR','&1.ext','R');
Now when I run the bat file,
the substitution happening is:
old: "&1.ext"
new: "ABCext"
the script returns "Invalid File Operation" error.
But when I change the script line to:
UTL_FILE.FOPEN('DIR','&1..ext','R');
it works. Why does the sql script here require two dots ? improved formatting