Index: trunk/ippTools/share/magictool_definebyquery_select.sql
===================================================================
--- trunk/ippTools/share/magictool_definebyquery_select.sql	(revision 26387)
+++ trunk/ippTools/share/magictool_definebyquery_select.sql	(revision 28039)
@@ -35,7 +35,8 @@
 JOIN camRun USING(cam_id)
 JOIN chipRun USING(chip_id)
+JOIN rawExp USING(exp_id)
 LEFT JOIN
     (SELECT magic_id, exp_id, label
-        FROM magicRun 
+        FROM magicRun
         -- rerun hook %s
     ) AS oldMagicRun
