I am trying to load few values in Oracle table using SQLLDR command via Command Prompt. I am trying to set a variable to get users put file name which will be accepted in SQLLDR command. I have a Control file (.CTL), a Data file (.txt) however it is throwing error:
SQL*Loader-500: Unable to open file (sqlldrtest.dat)
even though I have mentioned a .txt file as Data file.
This is first time I am using SQLLDR with a variable. I have successfully used SQLLDR command earlier without any variable.
Please can anyone help me in rectifying this error.
My code for .BAT file is:
set /p reportname="Enter Your Report Name: "
SQLLDR USERID=login/password@database CONTROL=%reportname%.CTL, DATA=%reportname%.txt
pause