Index: trunk/MagicSoft/Mars/datacenter/macros/checkfileavail.C
===================================================================
--- trunk/MagicSoft/Mars/datacenter/macros/checkfileavail.C	(revision 9033)
+++ trunk/MagicSoft/Mars/datacenter/macros/checkfileavail.C	(revision 9036)
@@ -75,9 +75,9 @@
     // -------------------------------------------
 
-    TString query = "MIN( NOT ("
+    TString query = "SELECT MIN( NOT ("
         "ISNULL(fRawFileAvail) OR "
         "ISNULL(fCCFileAvail) OR "
-        "ISNULL(fCaCoFileAvail) OR "
-        "ISNULL(fCaCoFileFound) OR "
+       // "ISNULL(fCaCoFileAvail) OR "
+       // "ISNULL(fCaCoFileFound) OR "
         "ISNULL(fTimingCorrection) OR "
         "ISNULL(fCompmux) "
@@ -94,4 +94,5 @@
     {
         cout << "ERROR - Unexpected number of returned rows (" << res->GetRowCount() << ")" << endl;
+        cout << query << endl;
         delete res;
         return 3;
@@ -103,4 +104,5 @@
     {
         cout << "ERROR - Unexpected result." << endl;
+        cout << query << endl;
         delete res;
         return 3;
