I have a folder with .sql files.
Inside the scripts there are well formatted and not well formatted "if statements"
To be more specific there are if statements which are all in the same line.
.i.e.
Code: Select all
IF CONDITION THEN STATEMENT1; END IF;
(the stament can be also in lower case)
Could you help me to make a batch modifying the above case
to
Code: Select all
IF CONDITION THEN
STATEMENT1;
END IF;
Code: Select all
@echo off&cls
setlocal enabledelayedexpansion
echo. Checking files ... Do not close until end
for %%a in (*.sql) do (
........
)
echo. Finished
pause
Thank you
--------------
Real case :
IF NOT CUR1%ISOPEN THEN RETURN; END IF;
iF v_a + v_b < 5 then find_min ; end If;