Make table query copy features

1123
2
Jump to solution
06-19-2020 03:43 PM
CCWeedcontrol
Occasional Contributor III

I am working with a table that I am making trying to query and take the features that are selected from the query to a new layer/feature class but I am not sure why it is not working. I don't get any error's, using Python 3.6.8.

I have tried Copy features and Table to geodatabase conversion but nothing gets created.

env.workspace = r"D:\Temp\temp.gdb"
origin_table = "LV"

Clause = "group_code IN ('01','02','03','05')"

arcpy.MakeQueryTable_management(origin_table, "tmp_view", "NO_KEY_FIELD", "", "",Clause)
arcpy.TableToGeodatabase_conversion("tmp_view", r"D:\Temp\temp.gdb")
#arcpy.CopyFeatures_management("tmp_view", r"D:\Temp\temp.gdb\LV_1")
0 Kudos
1 Solution

Accepted Solutions
JoshuaBixby
MVP Esteemed Contributor

Have you tried using Make Table View—Data Management toolbox | Documentation ?  Make Query Table can be temperamental.

View solution in original post

2 Replies
DanPatterson
MVP Esteemed Contributor

a where clause won't do?

Feature Class to Feature Class—Conversion toolbox | Documentation 


... sort of retired...
0 Kudos
JoshuaBixby
MVP Esteemed Contributor

Have you tried using Make Table View—Data Management toolbox | Documentation ?  Make Query Table can be temperamental.