#!/bin/csh

echo 'Deleting entries for BEL ...'
\rm BEL.*.tbl Output.BEL.* Error.BEL.*
sqlplus user/passwd@db @BEL.sql

echo 'Splitting BEL in multiple time spans ...'
../../bin/Split_Station BEL

foreach i (BEL.*.tbl)
echo 'Populating ', $i
../../bin/Populate_Station $i > Output.$i:r
mv Error.log Error.$i:r
end

