I'm running a simple batch file to execute a SQL statement.
The batch file:
cd /D C:\sqlcl\bin
sql username/password@host:port:SID @C:\scripts\statement.sql
exit
The SQL statement runs perfectly. It spools the results of the query to a CSV file and returns to the SQL>
prompt.
The issue is the batch file doesn't go to the next line to exit SQL and the CMD window. No matter what command I test, the batch file does not go to the 3rd line.
Is there something I need to add to *.sql
file to force it to end? Am I missing something with using exit? I've tried QUIT
, HOST
to return to CMD, ECHO
to print something but not matter the command, it never goes to that line but does return to the SQL prompt.