I am trying to calculate a percentage in a field in a table. customers and total_customers are short integer fields.
arcpy.AddField_management(tableSepSel2, "percent", "DOUBLE") arcpy.CalculateField_management(tableSepSel2, "percent", "!customers! / !total_customers!*100", "PYTHON_9.3")
I don't get any errors but all the values in the percent field are zero when most of them should not be zero.
If I go into ArcMap and use the field calculator with the Python parser, the same thing happens. However, when I choose the VBScript parser in ArcMap and redo the code using brackets it works fine.