for day in ${days}
do
for tb in ${tables}
do
sqlplus **/** @ tmp.sql
echo "set feedback off;" >>tmp.sql
echo " whenever sqlerror exit sql.sqlcode" >>tmp.sql
for day in ${days}
do
for tb in ${tables}
do
echo "insert into M_REP_BACK_RECORD(TASK_ID,TABLE_TYPE,BACK_TABLE_NAME,TABLE_NUM,BACK_DATA_DATE,BACK_AREA,BACK_STATE,BACK_BE_TM) values(1,'2','${tb}','0','${day}','$1','0','${betime}');" >>tmp.sql
done
done
echo "commit;" >> tmp.sql
echo "exit;" >>tmp.sql
sqlplus ***/*** @tmp.sql
rm tmp.sql
exit 0; |