Index: trunk/ippToPsps/jython/diffbatch.py
===================================================================
--- trunk/ippToPsps/jython/diffbatch.py	(revision 37763)
+++ trunk/ippToPsps/jython/diffbatch.py	(revision 37917)
@@ -327,6 +327,12 @@
         self.logger.infoPair("need to cull"," nulls objid")
         results= self.scratchDb.reportAndDeleteRowsWithNULLS("DiffDetection", "diffObjID")
+        self.logger.infoPair("Adding 'row' columns to", "DiffDetection tables")
+        # diff has a primary key, so use this instead
+        self.scratchDb.addRowCountColumnNoKey("DiffDetection", "row")
         self.logger.infoPair("adding","uniquePSPSDFid")
         self.updatePspsUniqueIDs("DiffDetection")
+        self.logger.infoPair("Dropping row column from", "DiffDetection table")
+        self.scratchDb.dropColumn("DiffDetection", "row")
+ 
 
     '''
@@ -424,7 +430,8 @@
 
     def updatePspsUniqueIDs(self,table):
-        sql = "UPDATE "+table+" join (select @r:=@r+1 rownum, diffobjID from \
-        (select @r:=0) r, "+table+" t) as foo using (diffobjID) set \
-        uniquePspsDFid = ((" +str(self.batchID)+ "*1000000000 ) + rownum)"
+        #sql = "UPDATE "+table+" join (select @r:=@r+1 rownum, diffobjID from \
+        #(select @r:=0) r, "+table+" t) as foo using (diffobjID) set \
+        #uniquePspsDFid = ((" +str(self.batchID)+ "*1000000000 ) + rownum)"
+        sql = "UPDATE DiffDetection set uniquePspsDFid = (("+str(self.batchID)+"*1000000000 ) + row)"
         try: self.scratchDb.execute(sql)
         except:
