spacepaste

  1.  
  2. if rdc == True:
  3. sql = "SELECT * FROM INTERVENTIONS_GEO_UNITES_RDC" + arg1
  4. cursor.execute(sql)
  5. rows = cursor.fetchall()
  6. avec_rdc = (row for row in rows if rdc == True)
  7. for row in avec_rdc:
  8. trow = iCur.newRow()
  9. trow.INCIDENT_N = row[0]
  10. trow.DATE_INTER = row[2]
  11. trow.ADRESSE_IN = row[3]
  12. trow.TYPE_INT = row[4]
  13. trow.CAS_NO = row[5]
  14. trow.REGION = row[6]
  15. trow.CATEGORIE = row[7]
  16. trow.SITE_KEY = row[8]
  17. trow.ARRONDISSE = row[9]
  18. trow.LISTE_UNIT = row[11]
  19. trow.LONGITUDE = row[12]
  20. trow.LATITUDE = row[13]
  21. iCur.insertRow(trow)
  22. else:
  23. sql = "SELECT * FROM INTERVENTIONS_GEO_UNITES WHERE " + arg1
  24. cursor.execute(sql)
  25. rows = cursor.fetchall()
  26. sans_rdc = (row for row in rows if rdc == False)
  27. for row in sans_rdc:
  28. trow = iCur.newRow()
  29. trow.INCIDENT_N = row[0]
  30. trow.DATE_INTER = row[1]
  31. trow.ADRESSE_IN = row[2]
  32. trow.TYPE_INT = row[3]
  33. trow.CAS_NO = row[4]
  34. trow.REGION = row[5]
  35. trow.CATEGORIE = row[6]
  36. trow.SITE_KEY = row[7]
  37. trow.ARRONDISSE = row[8]
  38. trow.LISTE_UNIT = row[9]
  39. trow.LONGITUDE = row[10]
  40. trow.LATITUDE = row[11]
  41. iCur.insertRow(trow)
  42.