3

I have 2 tables in a file geodatabase and I need to update a field (via ArcObjects) in the first table with a field in the first. Basically, the equivalent to SQL Server's update statement:

UPDATE t1
 SET t1.DacCode = t2.NewDacCode
 FROM Table1 as t1
 INNER JOIN Table2 t2 ON t1.PID = t2.PID ;

I would also be curious as to accomplish this sort of update (if different from a direct set of another field value):

UPDATE t1
 SET t1.DacCodeDesc = Concat(t2.NewDacCode,'_1201')
 FROM Table1 as t1
 INNER JOIN Table2 t2 ON t1.PID = t2.PID ;

I currently have a IQueryDef that returns a cursor of what I want to update but that's read-only. So I'm hoping there's a way to do it that is faster than IRow.Store.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.