I have a table and a feature class in a file geodatabase. I want to export records from the table that match what is in the feature class using ModelBuilder. For example the table contains 100 records and there are only 30 in the feature class. I want to export only the 30 records that match what is in the table. This is the SQL that I am trying to use:
GIS_ID IN (SELECT GIS_ID FROM FeatureClass)
-
You could join by attributes with the keep common option, make a feature layer, remove join then CopyFeatures to create an output.Michael Stimson– Michael Stimson2018年07月10日 00:00:35 +00:00Commented Jul 10, 2018 at 0:00
1 Answer 1
If your query is working then you need only run the Table Select tool from the Analysis toolbox. This takes a where clause and exports the rows to a new table.
As you have the table and featureclass in the same file geodatabase then your sub-query should work. The example below worked, my expression is the same as yours.
Explore related questions
See similar questions with these tags.