echo off

rem "sql2017_create_table_InstantPaymentSystemTypes.sql"
rem "sql2017_fill_table_InstantPaymentSystemTypes.sql"  
rem "sql2017_create_model.sql" 
rem "sql2017_MatchName4_payments_I4C.sql" 

rem sql2017_create_table_InstantPaymentSystemTypes.sql 
call :sqlcmd_ sql2017_create_table_InstantPaymentSystemTypes.sql 
if %ERRORLEVEL% NEQ 0 goto failed

rem sql2017_fill_table_InstantPaymentSystemTypes.sql 
call :sqlcmd_ sql2017_fill_table_InstantPaymentSystemTypes.sql 
if %ERRORLEVEL% NEQ 0 goto failed

rem sql2017_create_model.sql
call :sqlcmd_ sql2017_create_model.sql 
if %ERRORLEVEL% NEQ 0 goto failed

rem sql2017_MatchName4_payments_I4C.sql
call :sqlcmd_ sql2017_MatchName4_payments_I4C.sql
if %ERRORLEVEL% NEQ 0 goto failed

echo sql2017.cmd ok
exit /B 0

:: ---------------------failed
:failed
echo sql2017.cmd failed
exit /B 1

:sqlcmd_ [arg1]
echo %1 ...
call "%prospero_root%\Internal\Utils\sqlcmd_.cmd" %1
echo %ERRORLEVEL%
exit /b %ERRORLEVEL%










