I'm trying to use an integer value in a WHERE clause (looking at an integer field).
expression = "'SERVICE' = 'Service' " expression = expression + 'AND ' expression = expression + "'GPS_TIME_TOTAL' > " + "%d" % 10 arcpy.SelectLayerByAttribute_management(outServFCView,"NEW_SELECTION",expression) This code (using the %d) gives me 'ExecuteError: ERROR 000358: Invalid expression'
When I use %s and '', it runs OK but doesn't give me any records because it's looking into a integer field to find a string.
'SERVICE' = 'Service' AND 'GPS_TIME_TOTAL' > '10' Any ideas?
أكثر...
expression = "'SERVICE' = 'Service' " expression = expression + 'AND ' expression = expression + "'GPS_TIME_TOTAL' > " + "%d" % 10 arcpy.SelectLayerByAttribute_management(outServFCView,"NEW_SELECTION",expression) This code (using the %d) gives me 'ExecuteError: ERROR 000358: Invalid expression'
When I use %s and '', it runs OK but doesn't give me any records because it's looking into a integer field to find a string.
'SERVICE' = 'Service' AND 'GPS_TIME_TOTAL' > '10' Any ideas?
أكثر...