Selecting from a Database Table

721
1
10-19-2012 08:31 AM
JasonTaylor
New Contributor
I've been experimenting with selecting data from database tables and trying to develop a work flow that allows me to select features from the tables without:


  • saving the db table as a csv,

  • importing the table to Arc,

  • saving the layer,

  • performing my selection,

  • exporting the table again,

  • importing the table back into my database.

Currently, I have my database table connected to arcgis and I have made my event layer from my database table. When I try to query my event, it won't let me. I can query the table, and make an event of the selection, but the event contains all the records and not simply the selected ones. It looks like I will still need to save my layer before making my selection, which is a messy pain. Does anyone know of a work around to doing these kinds of simple spatial queries that doesn't require me to have so much junk data to get my results.

I am using ArcView 10.0 and I have two database connections, one in SQL and the other in Access.

Thanks in advance!!
0 Kudos
1 Reply
MarcinGasior
Occasional Contributor III
I'm not sure, if I understood you correctly - so just a thought.

You can try Make Query Table tool which allow to query directly tables from OLE DB connection and Spatial Database connection.
You can specify which files to preserve and enter SQL query expression.

The output is a temporary table view which can be used as an input for Make XY Event Layer tool.
Then you can chain those two tools in model tool.
0 Kudos