当前位置: 代码迷 >> SQL >> SDE惯用SQL
  详细解决方案

SDE惯用SQL

热度:79   发布时间:2016-05-05 15:15:34.0
SDE常用SQL
1.获取某个图层的srid
SELECT SRID FROM SDE.ST_GEOMETRY_COLUMNS WHERE TABLE_NAME = ? AND OWNER = ?

2.SHAPE转WKT
SELECT SDE.st_astext(SHAPE) wkt FROM table WHERE objectid = ?

4.获取下一个OBJECTID
SELECT SDE.VERSION_USER_DDL.NEXT_ROW_ID('OWNER',(SELECT REGISTRATION_ID FROM SDE.TABLE_REGISTRY WHERE TABLE_NAME = 'TABLE' AND OWNER = 'OWNER')) AS OBJECTID from dual

5.WKT转SHAPE
INSERT INTO TABLE VALUES (OBJECTID,SDE.ST_GEOMETRY('wkt', srid))
  相关解决方案