Select to view content in your preferred language

An invalid SQL statement was used

6459
11
Jump to solution
06-10-2021 01:48 AM
hamidmechouet
New Contributor II

Hello, I created a function to round the values of the results on my script which queries the atlases by selecting a layout, but when executing it I have the following error: An invalid SQL statement was used.
here is the function: 

for field in liste:
with arcpy.da.UpdateCursor(r'in_memory/resultats_table', [field]) as cursor:
for row in cursor:
if row[0] == None:
pass
else:
row[0] = round(row[0], 2)
cursor.updateRow(row)

 

0 Kudos
11 Replies
hamidmechouet
New Contributor II

thanck you for your help johannes, but i have the same error.same_error.PNG

0 Kudos
DanPatterson
MVP Esteemed Contributor

That is because you left in your old code (lines 55-64) and didn't use the suggested code beginning at line 67.


... sort of retired...
0 Kudos