1:更新数据
create or replace procedure UpdatePoly(tablename in nvarchar2,
keyfield in nvarchar2,
keyvalue in nvarchar2,
srid in nvarchar2,
poly in clob) as
strsql varchar2(8000);
begin
strsql := 'update '|| tablename ||' set shape= sde.st_polygon('''|| poly ||''','||srid||') where '|| keyfield ||'='''|| keyvalue||'''';
execute immediate strsql;
commit;
end;
2:更新空间数据:
create or replace procedure UpdatePoly(keyvalue in nvarchar2,
srid in INTEGER,
poly in clob) as
geom sde.st_geometry;
begin
geom:=sde.st_polyfromtext(poly,srid);
update SP_ARCHIVESREDLINE t set t.shape = geom where t.archivesid = keyvalue;
commit;
end;