首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > SQL Server >

SDE惯用SQL

2012-08-15 
SDE常用SQL1.获取某个图层的sridSELECT SRID FROM SDE.ST_GEOMETRY_COLUMNS WHERE TABLE_NAME ? AND OWN

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

热点排行