This is my first time asking a question on StackExchange. I hope I phrase my question and describe my attempts to understand my problem well enough!
While working with SearchCursor, I'm trying to specify the SQL where_clause from a table called "Parcel" within the featureClass, and I want the MAX and MIN value from the column LAND_VALUE. Below is what I try just for MAX.
import arcpy feature_class = "C:\foo.ext" where_clause = "SELECT MAX(LAND_VALUE) AS MaxLandVal from Parcel" rows = arcpy.SearchCursor(feature_class, where_clause, "", "", "LAND_VALUE D")
I'm told an invalid SQL statement was used. However, I'm not sure if the SQL statement is invalid, or if perhaps I'm stating the SQL query within SearchCursor incorrectly. Despite using the reference material for SearchCursor, SQL MAX() and SQL MIN(), and despite referencing a few different examples, I can't get this to work! Please advise!
Finally, how would I display MaxLandVal if the query were to be correct? Perhaps something like...?
for blah in rows: print blah.MaxLandVal
Thank you for your help!