I am trying to use the code below to allow testing of one field which contains mixed case against another field which contains uppercase only. I have read many many posts but they generally tend to look at converting or using Field Calc and I do not want the values to be converted. (only on the fly) I am using ArcGIS 10.2 Win 7 x64 and Python 27.
# Refine the selection set to only 'LGA <> LGA_NAME' fn99 = "LGA" fn98 = "LGA_NAME" EXPR1 = fn99.upper() +"<>"+ fn98.upper() DEF1 = arcpy.SelectLayerByAttribute_management(fc_lyr2, "NEW_SELECTION", EXPR1) print "\n" "Using SelectLayerByAttribute to create a 'NEW_SELECTION' from " + fc_lyr2 print DEF1.getMessages()
Note I dont get any errors, my code just doesnt test successfully so all values are retyurned and I know there are at least 50 incorrect values from manual checking.