for /f "delims=" %%a in (%current_dir%\precreatedb_error.log) do (
set /a a+=1
if !a!==2 set secondrow=%%a
)
set result=!secondrow:~4,-1!
从第四个开始取取到倒数第一个
find /i /c "ORA-" %current_dir%\precreatedb.log>%current_dir%\precreatedb_error.log
FOR /F "tokens=3 delims=:" %%i in (%current_dir%\precreatedb_error.log) do (set record=%%i echo %record%)
set /A ErrorNu=!record:~1,1!
if !ErrorNu!==0 ( echo create table successfully,return 0
echo create bmp tables successfully>%current_dir%\precreatedb_error.log
)else (
echo failed to create table,return the error code
find /i "ORA-" %current_dir%\precreatedb.log>%current_dir%\precreatedb_error.log
FOR /F %%i in (%current_dir%\precreatedb_error.log) do (set record=%%i)
set result=!record:~4,-1!
exit /b %result%