AnsweredAssumed Answered

da cursor behaviour on layers with where clause

Question asked by mzcoyle on Jul 16, 2013
Latest reply on Aug 1, 2013 by rzufelt
I can't seem to find any reference to this in help or forums, but it seems a da cursor cannot apply a where clause to a layer with a where clause already applied. Does anyone know if this is this working as intended behaviour or a bug?

Here is some test code where this occurred.

import arcpy  data = r'D:\GIS\DataBase\misc.gdb\CLI_N' lyr = 'temp' arcpy.MakeFeatureLayer_management(data, lyr, 'OBJECTID < 100') print(arcpy.GetCount_management(lyr)) count = 0 cursor = arcpy.da.SearchCursor(lyr, 'OBJECTID', 'OBJECTID < 10') for _ in cursor:     count += 1 print(count)

This code returned
>>>  99 99