Index: trunk/MagicSoft/Mars/datacenter/scripts/sourcefile
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/sourcefile	(revision 7908)
+++ trunk/MagicSoft/Mars/datacenter/scripts/sourcefile	(revision 7909)
@@ -296,5 +296,7 @@
       done
    fi
-   query=$query" isnull(fStartTime) and isnull(fFailedTime) and isnull(fFailedCode) and isnull(fFailedCodeAdd) and isnull(fReturnCode) order by $primary desc "
+   query=$query" isnull($column) "
+   query=$query" and isnull(fStartTime) and isnull(fFailedTime) and isnull(fFailedCode) and isnull(fFailedCodeAdd) and isnull(fReturnCode) "
+   query=$query" order by $primary desc "
    if [ "$singleprocess" = "yes" ]
    then 
@@ -311,18 +313,18 @@
       if [ "$singleprocess" = "yes" ]
       then 
-         listfile=$listpath/ToDo-$table-$column-$process.txt
+         todofile=$listpath/ToDo-$table-$column-$process.txt
          echo "  => found $process"
       else
-         listfile=$listpath/ToDo-$table-$column.txt
+         todofile=$listpath/ToDo-$table-$column.txt
          echo "found processes"
       fi
-#      echo " list: "$listfile
+#      echo " list: "$todofile
       
-      if ls $listfile > /dev/null 2>&1
+      if ls $todofile > /dev/null 2>&1
       then
-         echo "$listfile exists already"
+         echo "$todofile exists already"
          contex 
       fi
-      echo $process > $listfile
-   fi
-}
+      echo $process > $todofile
+   fi
+}
