Select to view content in your preferred language

Query 2 Tables Inner Joins

953
4
12-03-2012 05:15 AM
JayKappy
Frequent Contributor
I have 2 stand alone tables in the File Geodatabase. (Test_SignStandalone_3 and Test_SignHistorical_3)
I need to select and delete the duplicate records in one table (Test_SignHistorical_3) where they match the other table (Test_SignStandalone_3) via numerous fields....

I exported the data out to Access and was able to run the SQL Query below and was successful...

SELECT Test_SignStandalone_3.*
FROM Test_SignHistorical_3 INNER JOIN Test_SignStandalone_3 ON (Test_SignHistorical_3.NewSupID = Test_SignStandalone_3.New_SupID) AND (Test_SignHistorical_3.NOTES = Test_SignStandalone_3.NOTES) AND (Test_SignHistorical_3.CONDITION = Test_SignStandalone_3.CONDITION) AND (Test_SignHistorical_3.WORK_ORDER_NUMBER = Test_SignStandalone_3.WORK_ORDER) AND (Test_SignHistorical_3.WHY = Test_SignStandalone_3.WHY) AND (Test_SignHistorical_3.WHO = Test_SignStandalone_3.WHO) AND (Test_SignHistorical_3.COMPLETED = Test_SignStandalone_3.COMPLETED) AND (Test_SignHistorical_3.ACTIVITY = Test_SignStandalone_3.ACTIVITY) AND (Test_SignHistorical_3.SHEETING_M = Test_SignStandalone_3.SHEETING_M) AND (Test_SignHistorical_3.WHEN_STARTED = Test_SignStandalone_3.WHEN_STARTED) AND (Test_SignHistorical_3.WHEN_ENDED = Test_SignStandalone_3.WHEN_ENDED) AND (Test_SignHistorical_3.New_SignID = Test_SignStandalone_3.New_SignID);

My question is how to I accomplish this in ArcGIS and my File Geodatabase.
Thanks
0 Kudos
4 Replies
LanceShipman
Esri Regular Contributor
What version of ArcGIS are you using?
0 Kudos
JayKappy
Frequent Contributor
10.0  not ready to move to 10.1 yet due to conflict with another software.
0 Kudos
LanceShipman
Esri Regular Contributor
Have you tried this with File Geodatabase? We added INNER JOIN at 10.0. You have to use code and an IQueryDef.
0 Kudos
JayKappy
Frequent Contributor
seems like this is far more challenging than it should be.  Lacking some serious DB tools.
couple minutes out of something like Access...
* Think I am going to import into FGDB
* Create a field
* Go into Access and run the query and update the records that match my query
* Go back into GIS and delete those records.

Thanks
0 Kudos