- Timestamp:
- Mar 28, 2015, 8:28:32 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20150112/ippToPsps/jython/diffbatch.py
r37763 r38052 327 327 self.logger.infoPair("need to cull"," nulls objid") 328 328 results= self.scratchDb.reportAndDeleteRowsWithNULLS("DiffDetection", "diffObjID") 329 self.logger.infoPair("Adding 'row' columns to", "DiffDetection tables") 330 # diff has a primary key, so use this instead 331 self.scratchDb.addRowCountColumnNoKey("DiffDetection", "row") 329 332 self.logger.infoPair("adding","uniquePSPSDFid") 330 333 self.updatePspsUniqueIDs("DiffDetection") 334 self.logger.infoPair("Dropping row column from", "DiffDetection table") 335 self.scratchDb.dropColumn("DiffDetection", "row") 336 331 337 332 338 ''' … … 417 423 AND b.imageID = " + str(imageID) 418 424 419 self.scratchDb.execute(sql) 420 425 try: self.scratchDb.execute(sql) 426 except: 427 self.logger.infoPair("failed sql",sql) 428 raise 421 429 ''' 422 430 Updates table and generates pspsuniqueids … … 424 432 425 433 def updatePspsUniqueIDs(self,table): 426 sql = "UPDATE "+table+" join (select @r:=@r+1 rownum, diffobjID from \ 427 (select @r:=0) r, "+table+" t) as foo using (diffobjID) set \ 428 uniquePspsDFid = ((" +str(self.batchID)+ "*1000000000 ) + rownum)" 434 #sql = "UPDATE "+table+" join (select @r:=@r+1 rownum, diffobjID from \ 435 #(select @r:=0) r, "+table+" t) as foo using (diffobjID) set \ 436 #uniquePspsDFid = ((" +str(self.batchID)+ "*1000000000 ) + rownum)" 437 sql = "UPDATE DiffDetection set uniquePspsDFid = (("+str(self.batchID)+"*1000000000 ) + row)" 429 438 try: self.scratchDb.execute(sql) 430 439 except:
Note:
See TracChangeset
for help on using the changeset viewer.
