Select to view content in your preferred language

Is it possible to build SQL subquery crossing multiple geodatabases

1531
1
03-12-2012 03:27 PM
JackZHANG
Frequent Contributor
Hello,
I'm wondering if it's possible to in ArcMap or ArcCatalog to build a SQL sub query crossing multiple geodatabases.

For example I have 100 features in Table_A in database DB_A, and 50 features in Table_B in DB_B. I want to build query like

"Select id From Table_A Where (Select id From Table_B)"

At the moment, the above query only work if Table_A and Table_B are in the same database. How can I make it work if the two tables are in seprate database?

Thanks

regards,
Jack
0 Kudos
1 Reply
BrentPierce
Esri Contributor
Jack,

At ArcGIS 10 you should be able to use query layers to execute this type of query and return the result set as a layer in ArcMap. All the DBMS platforms we support, support the concept of cross database queries and many support queries which span multiple database server instances (an example of this technology is "Linked Servers" in SQL Server). As with anything else in the database world, the syntax varies from DBMS to DBMS but it is possible, you will just have to look up the specific syntax for the platform(s) you are working with.

Hope this helps,
-Brent
0 Kudos