Capture Sql Error when execute in CMD file
- by sarah xia
Hi,
I am writing a CMD file which runs a bunch of sql files, like this:
:: Running every sql file in the temp directory
For %%G IN (.\install\*.sql) DO (
:: run sql script
echo exit | sqlplus interacct/interacct @%%G
)
My question is how do I capture an error when one of the scripts didn't succeed?
Thankyou.
Sarah