我对 BAT 文件不是很熟悉,但我有一个运行 sqlplus 查询的文件,返回行数,如果大于 0,则运行另一个 bat 文件。我觉得我快到了,但我不断收到这个错误:
%%a 此时出乎意料
@echo off
for /f "delims=" %%a in (
'sqlplus USER/PASS@OMP1 @VoiceBlockTrig.SQL'
) do set rowcount=%%a
if %ROWCOUNT% GTR 0 (
c:\SQLTRIGGERS\VoiceBlkAutoationBAT.bat
)
当我运行上述内容时,我得到这个作为回应:
@echo off
for /f "delims=" %%a in (
%%a was unexpected at this time
'sqlplus USER/PASS@OMP1 @VoiceBlockTrig.SQL'
''sqlplus' is not recognized as an internal or external command, operable program or batch file
) do set rowcount=%%a
if %ROWCOUNT% GTR 0 (
More? c:\SQLTRIGGERS\VoiceBlkAutoationBAT.bat
More?
当我运行这个:
sqlplus user/pass@P1 @VoiceBlockTrig.SQL
我也得到了一个整数值