Index: trunk/DataCheck/Tools/get_data.sh
===================================================================
--- trunk/DataCheck/Tools/get_data.sh	(revision 19030)
+++ trunk/DataCheck/Tools/get_data.sh	(revision 19031)
@@ -24,4 +24,5 @@
    # time range and source
    where=" WHERE fSourceKey="$source" AND fNight BETWEEN "$nightmin" AND "$nightmax
+   where=$where" AND NOT ISNULL(fNumExcEvts) "
    # some sanity checks
    where=$where" AND fRunTypeKey=1 "
@@ -158,7 +159,7 @@
       fi
       queryext=$queryext" "$time" as time, "$start" as start, "$stop" as stop, "
-      queryext=$queryext" round("$correxcrate", 1) as correxcrate, round($flux, "$fluxprec") as flux, "
+      queryext=$queryext" round("$correxcrate", 1) as correxcrate, round("$flux", "$fluxprec") as flux, "
       queryext=$queryext" "$deltat" as deltat, round("$ontime", 1) as ontime, "
-      queryext=$queryext" round("$correxcrateerr", 1) as correxcrateerr, round($fluxerr, "$fluxprec") as fluxerr, "
+      queryext=$queryext" round("$correxcrateerr", 1) as correxcrateerr, round("$fluxerr", "$fluxprec") as fluxerr, "
       queryext=$queryext" round("$significance", 1) as significance "
       
@@ -244,6 +245,6 @@
 # db
 sqlpw=/home/$USER/.mysql.pw # file with mysql credentials
-host=lp-fact
-#host=10.0.100.21
+#host=lp-fact
+host=10.0.100.21
 #host=localhost
 dbname=factdata # name of database
