Hi. Have appreciated past help.
I'm trying to incorporate an attribute query into an arcpy script, and then work with the results of that query in a subsequent for: loop.
The script snippet below successfully creates the Indiana folder and GDB, and selects the Indiana counties, and creates a new INcounties feature class, as intended, BUT the new feature class includes ALL the US counties, not just the selected IN counties.
would appreciate any suggestions!
arcpy.CreateFolder_management(r"E:\advAppScripting\testing\tornhazard", "Indiana")
arcpy.CreateFileGDB_management(r"E:\advAppScripting\testing\tornhazard\Indiana", "IN_data")
arcpy.SelectLayerByAttribute_management("counties.dbf", "NEW_SELECTION",
""""STATE_NAME" = 'Indiana'""")
arcpy.CopyFeatures_management(r"E:\advAppScripting\testing\tornhazard\counties_layer",
r"E:\advAppScripting\testing\tornhazard\Indiana\IN_data.gdb\INcounties")