How do I run a SQL-style UPDATE operation in GIS?

2042
6
09-20-2016 08:16 AM
by Anonymous User
Not applicable

 I want to join a layer in ArcServer to a layer in another DB (that part's easy). Then do an UPDATE [attribute x] where table1.ID=table2.ID kind of thing. Merge won't allow a table. Thanks in advance!

0 Kudos
6 Replies
forestknutsen1
MVP Regular Contributor

Are you using sde? If so what about using a database tool (we use TOAD) and just modify the table outside of Arc. It is safe as long as your tables are not versioned or if they have no add/delete tables. Or you could use arcpy with ArcSDESQLExecute and do the same thing. 

by Anonymous User
Not applicable

I am trying to do it from SQL Management Studio now which is the same, functionally, as TOAD. My tables are registered as versioned tho so they are editable. Why is that a problem?

0 Kudos
George_Thompson
Esri Frequent Contributor
JoeBorgione
MVP Emeritus

Is it a one to one relationship?  If so you could use a temporary join to do what you want.  SInce I don't know how the table you want want to attribute is defined, you may need to add a field (or more) to hold the data you need.

That should just about do it....
by Anonymous User
Not applicable

I can do a join, but that won't allow me to do a bulk UPDATE operation.

0 Kudos
JoeBorgione
MVP Emeritus

I'm not sure that SSM is the tool to use with a versioned database;  you may run into some problems with that.

That should just about do it....
0 Kudos