-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdeleteFNB.sh
executable file
·13 lines (13 loc) · 1.69 KB
/
deleteFNB.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/bash
echo "Delete data from invalid stations"
echo "select * from stations where station like '$1%' and active = '$2'; "
mysql -e "select * from stations where station like '$1%' and active = '$2'; " ognrange
mysql -e "delete from stationlocation where station IN (select id from stations where station like '$1%' and active = '$2');" ognrange
mysql -e "delete from roughcoverage where station IN (select id from stations where station like '$1%' and active = '$2');" ognrange
mysql -e "delete from estimatedcoverage where station IN (select id from stations where station like '$1%' and active = '$2');" ognrange
mysql -e "delete from availability where station_id IN (select id from stations where station like '$1%' and active = '$2');" ognrange
mysql -e "delete from availability_log where station_id IN (select id from stations where station like '$1%' and active = '$2');" ognrange
mysql -e "delete from positions_mgrs where station IN (select id from stations where station like '$1%' and active = '$2');" ognrange
mysql -e "delete from stats where station IN (select id from stations where station like '$1%' and active = '$2');" ognrange
mysql -e "delete from statssummary where station IN (select id from stations where station like '$1%' and active = '$2');" ognrange
mysql -e "delete from stations where station like '$1%' and active = '$2' ;" ognrange