Select to view content in your preferred language

Using ST_length or ST_Y operator/function with in Oracle trigger

862
2
03-29-2012 10:50 AM
YogeshShah
Emerging Contributor
I could use following statement without any problems(Using SQL navigator)

select st_x(st_startpoint(s.shape)),st_Y(st_startpoint(s.shape)),st_X(st_endpoint(s.shape)),st_Y(st_endpoint(s.shape)),st_length(s.shape) from san_pipe s

I am trying to create an update trigger on san_pipe to get a length and coordinates and populate in feature class columns as under

:new.length_calc := st_length(:new.shape)

I am not able to compile the trigger and receive invalid use of operator error.

Are they not allowed to be used in trigger? Am I missing anyting? I also tried using sde.st_length
0 Kudos
2 Replies
YogeshShah
Emerging Contributor
It works now!

Used select st_length(:new.shape) into vlength from dual;
:new.length_calc := vlength;

Have fun!
0 Kudos
VinceAngelo
Esri Esteemed Contributor
You should prefix operators for ArcSDE ST types and functions with "SDE." since
Oracle has reserved the synonyms for the SDO_GEOMETRY types.

- V
0 Kudos