SDE for Oracle Insert 时设置 ObjectID

本文介绍了如何使用Structured Query Language (SQL) 在ArcSDE数据库中更新具有ST_Geometry类型的简单特征。通过利用next_row_id函数生成唯一的行ID,可以插入新的简单特征。示例包括从Oracle数据库中获取注册ID,并使用此信息来填充新特征的行ID。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Summary

When data is stored in ArcSDE using the ST_Geometry type, it is possible to insert new simple features using Structured Query Language (SQL). If the layer being updated has an ArcSDE maintained row ID, use the next_row_id function from the sde.version_user_ddl package to generate a new, unique value for the row ID. The example below is from an Oracle database.


Procedure

The next_row_id function used to generate row IDs takes two parameters: owner and registration_id. Owner is the name of user who owns the table. Registration_id comes from the repository table sde.table_registry. With the table owner name and the registration ID, a SQL statement can be created that populates the row ID. The example below is from an Oracle database and uses a layer named 'parks owned' by a user named 'gisdata'.

Find the registration_id for the parks feature class owned by the gisdata user:
SQL> SELECT registration_id FROM sde.table_registry WHERE table_name = 'PARKS' and owner = 'GISDATA';



REGISTRATION_ID

---------------

             759

      SQL to be executed:
      SQL> INSERT INTO parks (OBJECTID,SHAPE) VALUES (sde.version_user_ddl.next_row_id('GISDATA', 759), ST_GEOMETRY('point (2790683.61 1130335.86)', 3));
1 row created.

http://support.esri.com/en/knowledgebase/techarticles/detail/32657

转载于:https://www.cnblogs.com/zany-hui/articles/2177034.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值