Index: trunk/ippTools/share/chiptool_pendingimfile.sql
===================================================================
--- trunk/ippTools/share/chiptool_pendingimfile.sql	(revision 19174)
+++ trunk/ippTools/share/chiptool_pendingimfile.sql	(revision 19181)
@@ -25,2 +25,14 @@
     AND chipProcessedImfile.class_id IS NULL
     AND chipMask.label IS NULL
+
+-- new where logic for update.  we probably need to add a 'data_state'
+-- field to chipProcessedImfile and update it (full, cleaned, etc) as
+-- we cleanup or update
+--    (chipRun.state = 'new'
+--    AND chipProcessedImfile.chip_id IS NULL
+--    AND chipProcessedImfile.exp_id IS NULL
+--    AND chipProcessedImfile.class_id IS NULL
+--    AND chipMask.label IS NULL) 
+--    OR
+--    (chipRun.state = 'update'
+--    AND chipProcessedImfile.data_state = 'cleaned'
