If I SELECT ALL the query, without the select works.
I only want to loop through 5 - 10 records, not 30,000. So trying to get a select statement to limit the number of records returned.
This code works:
for filename in filenames:
try:
for row in (arcpy.da.SearchCursor(filename, ['Shape@'])):
print(filename)
The sql_clause throws an error??
for filename in filenames:
try:
for row in arcpy.da.SearchCursor(filename, ['OBJECTID@', 'Shape@'], sql_clause=('select * from ' + ['OBJECTID@', 'Shape@'] + 'limit 5', None)):
print(filename)
Appreciate any pointers to fixing the sql_clause.
Thanks,
Clive