I\'m trying to use sql*plus to control a small Windows command script.
Basically, I want to execute some PL/SQL (perhaps select from a view or table or execute a fun
This is what I ended up using.
My .cmd script:
@ECHO OFF ECHO Checking Oracle... for /f %%i in ('sqlplus -s user/password@database @script.sql') do @set count=%%i echo %count% IF %count% GTR 0 GOTO :skipped GOTO :runprocess
Where script.sql:
SELECT COUNT(*) FROM table WHERE criteria = 1; exit