Index: trunk/ippTools/share/magictool_definebyquery_insert.sql
===================================================================
--- trunk/ippTools/share/magictool_definebyquery_insert.sql	(revision 18700)
+++ trunk/ippTools/share/magictool_definebyquery_insert.sql	(revision 20973)
@@ -5,5 +5,6 @@
     diff_id,
     skycell_id
-FROM magicBestDiffs
+FROM diffSkyfile
 WHERE
-    exp_id = @EXP_ID@ -- Update this with the appropriate exp_id
+    diff_id = @DIFF_ID@ -- Update this with the appropriate diff_id
+    AND fault = 0
