I've been trying to write a stand alone script to run any query from python, but I've run into a few problems. At first I tried this:
fc = "U:\RealGDB.gdb\acutalLayerName" Where = """"TOTAL NUMB FLOORS" = 2""" #TOTAL NUMB FLOORS is the actual field name. cursor = arcpy.da.SearchCursor(fc, ("'TOTAL NUMB FLOORS'"), Where) for row in cursor: #python crashes here print (row)
This crashes python. I've spent about a week trying to fix this and I can safely say that I'm completely lost. Every time I change the sql format to something else - when I add some quotes or brackets - I get an invalid syntax error. What's wrong with my sql; why does it cause python to crash at my for loop?
I imported arcpy and os. The table has about 84.4 records.