Is anyone else having trouble with arcpy.GetCount_management using a queried table?
I have a table in my TOC (not a feature class) and then I apply a query as:
Query works fine, but when I try getting the count of records in table as:
The result is the total number of rows before the query. If I do the same thing with a feature class it works fine. I'm running this in a simple stand alone script.
Just curious if anyone else had his problem. I worked around this by looping a cursor and counting the rows, so no big deal.
I have a table in my TOC (not a feature class) and then I apply a query as:
myTable.definitionQuery = "some query"
Query works fine, but when I try getting the count of records in table as:
count = int(arcpy.GetCount_management(myTable).getOutput(0))
The result is the total number of rows before the query. If I do the same thing with a feature class it works fine. I'm running this in a simple stand alone script.
Just curious if anyone else had his problem. I worked around this by looping a cursor and counting the rows, so no big deal.