Index: /trunk/ippTools/src/dettool.c
===================================================================
--- /trunk/ippTools/src/dettool.c	(revision 9464)
+++ /trunk/ippTools/src/dettool.c	(revision 9465)
@@ -1439,9 +1439,9 @@
         " FROM detProcessedImfile"
         " JOIN detRun"
-        "   ON detRun.det_id = detProcessedImfile.det_id"
+        "   USING(det_id)"
         " JOIN detInputExp"
         "   ON detRun.det_id = detInputExp.det_id"
         "   AND detRun.iteration = detInputExp.iteration"
-        "   AND detInputExp.exp_tag = detProcessedImfile.exp_tag"
+        "   AND detProcessedImfile.exp_tag = detInputExp.exp_tag"
         " WHERE"
         "   detRun.state = 'run'"
