#!/bin/csh

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

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

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

