Index: /trunk/ippTools/src/dettool.c
===================================================================
--- /trunk/ippTools/src/dettool.c	(revision 9210)
+++ /trunk/ippTools/src/dettool.c	(revision 9211)
@@ -2311,8 +2311,22 @@
     psString query = psStringCopy(
         "SELECT"
+        "   detRun.det_type,"
+        "   rawDetrendExp.camera,"
+        "   detStackedImfile.uri,"
         "   detNormalizedStatImfile.*"
         " FROM detNormalizedStatImfile"
+        " JOIN detStackedImfile"
+        "   USING(det_id, iteration, class_id)"
+        " JOIN detRun"
+        "   ON detNormalizedStatImfile.det_id = detRun.position"
+        " JOIN detInputExp"
+        "   ON detRun.position = detInputExp.det_id"
+        "   AND detRun.iteration = detInputExp.iteration"
+        " JOIN rawDetrendExp"
+        "   ON detInputExp.exp_tag = rawDetrendExp.exp_tag"
         " LEFT JOIN detNormalizedImfile"
-        "   USING(det_id, iteration, class_id)"
+        "   ON detRun.position = detNormalizedImfile.det_id"
+        "   AND detRun.iteration = detNormalizedImfile.iteration"
+        "   AND detNormalizedStatImfile.class_id = detNormalizedImfile.class_id"
         " WHERE"
         "   detNormalizedImfile.det_id IS NULL"
