I am creating a python script where I am trying to iterate over point feature class. I want to create seperate Feature classes from each individual day. So select daynumber and then export it to a new FC with an unique daynumber as name.
I was unable to find my answer online. So I decided to ask my question here.
My script looks as follows:
test1 = "D:\\Mijn_Doc\\Test_Geodatabase.gd\\test1" dayno = 2618 with test1 as rows: for row in rows: query = '"daynumber = '+ str(dayno) + '"' arcpy.Select_analysis(test1, 'D:\\Mijn_Doc\\Test_Geodatabase.gdb\\select'+str(dayno), query) dayno +=1
Gives the following error:
arcgisscripting.ExecuteError: ERROR 000358: Invalid expression "daynumber = 2618" Failed to execute (Select)
The selection looks fine, If I build it in Model Builder and export it to a Python script the expression looks the same as it looks in this Error message.