[GIS] Can we use procedures in a Query layer (ArcGIS Desktop 10.1 & Server 10.1)

arcgis-10.1arcgis-serverenterprise-geodatabasequery-layersql server

I have one basic question that.. Can we use procedures in Query layer (ArcGIS Desktop 10.1)??

Currently I am using query layer for ArcGIS Desktop 10.1 and its working fine . My DBA person told me that its difficult to modify query for each time.. As per discussion he told me that for large database its difficult to use query layer he suggested to use procedures..

I searched on Google and ArcGIS help..but there is no such information..

We are using Sql Server 2008 r2 , ArcGIS Desktop/Server 10.1..

So any help/links will be highly appreciated : )

Best Answer

I had a similar problem few weeks ago, you can see more information in this thread: How to register a stored procedure in ArcSDE?

Honestly, still I am not 100% sure if it is possible to do it or not, but in my opinion it seems that it is not: when you create the query layer, ArcGIS reads the database and creates the table you have defined. But it does NOT leave any channel opened for further refining of the query by changing the value of the input parameters of the procedure. The operation is done at once and you are never asked to change only your required parameters unless you re-write the query again.

Maybe what you can do to simplify your task, is creating a database view containing all the information that ANY combination of your procedure input parameters would need (no where clauses). And then, back in ArcMap, creating a query layer and specify in the WHERE clause the parameters that the procedure would require...

Hope this helps you to simplify queries and make them shorter...