I have Ingres DB and I keep all my procedures files in folder, if i need to rebuild them on DB. There is a lot of procedures which related to eachohter (called one from another), so that mean ai have to run some proceudre first then run other. Right now I am using bat file in which I have to supply file name, and it taking forefer to do it by hands one by one. To do it I am using this bat file.
echo '' > sqlout
more sqlout
set /p database="Enter database:"
if "%database%"=="" set database=1507
CALL C:\"Program Files"\Ingres\..\..\bin\setingenvs.bat
set directory_name=DBProcs
:While
set /p filename="Enter Procedure Filename:"
echo %filename%
sql DBServerName::%database% -udba <D:\Php_Web_Source\..\DBProcs\%filename% > sqlout
more sqlout
set /p another="Do you have another? (Y/N)"
if "%another%"=="N" goto EndWhile
goto While
:EndWhile
I want to it just run bat file and it should run all files in folder, but not sure how to do it. I was thinking about something like for loop, which call exist bat for each file in folder, but do not know how to do it, any help appreciated