#!/bin/csh

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

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

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

