2013-07-15 24 views
0

我在我的批處理文件中執行以下操作,在SELECT語句中使用「< 10」時它給了我ORA錯誤。在批處理文件中SELECT查詢中使用少於運算符

錯誤來在批處理文件:「系統找不到指定文件」 在output.txt的,只有這麼多正在打印,而不是完整的陳述: 從雙 退出選擇「X」

echo select 'X' from dual > output.txt 
echo where months_between(sysdate,to_date('20130715','YYYYMMDD')) < 10 ; >> output.txt 
echo exit >> output.txt 
findstr "X" output.txt>nul 
if %ERRORLEVEL% EQU 0 goto test_proc 

如何解決這個錯誤?

感謝

回答

1

使用^逃脫<

echo where months_between(sysdate,to_date('20130715','YYYYMMDD')) ^< 10 ; >> output.txt 

如發現here

+0

謝謝,它的工作。 – Sunny

+0

不客氣。 – rene