Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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 : )

share|improve this question

2 Answers 2

up vote 3 down vote accepted

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...

share|improve this answer
2  
+1, or another option is to publish the 'all data' layer and have ArcGIS Server clients use layerDefinitions (as per the API) to restrict what is mapped. In this scenario the client defines which clauses to apply, instead of a new Query Layer restricting the data. –  tomfumb Dec 6 '12 at 22:18
    
@All.. thanks for your reply..I will go though this and let you know..thanks : ) –  Sunil Dec 7 '12 at 4:47

Here procedure is stored procedure, which is a routine made of a set of SQL statements. It's stored in SQL Server once you finish to write it. But to create it, you need proper priviledge to do so in a DBMS. One advantage of stored procedure is efficiency because it can be ran by client again and again once it's created.

share|improve this answer
    
@All.. thanks for your reply..I will go though this and let you know..thanks : ) –  Sunil Dec 7 '12 at 4:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.